summaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorabranson <andrew.branson@cern.ch>2012-01-27 14:02:17 +0100
committerabranson <andrew.branson@cern.ch>2012-01-27 14:02:17 +0100
commit7d36c0df166e6eacd6c37a8295ef5ac0ac68bdd4 (patch)
tree9a7348571ee3b1d9dfe08788d5737fb8f65a5be5 /build.xml
Initial commit
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml66
1 files changed, 66 insertions, 0 deletions
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..74b0711
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="." default="jar" name="cristal-dev">
+ <!--===================================================================-->
+ <!-- Global properties -->
+ <!-- NOTE: Ant will automatically will add all jar files to the -->
+ <!-- classpath from the $(ANT_HOME)/lib directory. In cristal2 -->
+ <!-- setup this directories are equal to the cristal2/lib -->
+ <!-- directory which eliminates thecalculation of classpath for -->
+ <!-- the most of the 'javac' tasks -->
+ <!--===================================================================-->
+ <property name="name" value="cristal-dev"/>
+ <property name="version" value="1.0"/>
+ <!--===================================================================-->
+ <!-- Directories -->
+ <!--===================================================================-->
+ <property name="src.dir" value="src"/>
+ <property name="res.dir" value="ch/cern/cristaldev/resources"/>
+ <property name="build.dir" value="bin"/>
+ <property name="resource.dir" value="resources"/>
+ <!--===================================================================-->
+ <!-- Global javacc attributes -->
+ <!--===================================================================-->
+ <property name="debug" value="true"/>
+ <property name="deprecation" value="false"/>
+ <property name="optimize" value="true"/>
+ <property name="junit.fork" value="false"/>
+ <!-- ==================================================================-->
+ <!-- The pattern for the support files that need -->
+ <!-- to be copied when compiling classes -->
+ <!-- ==================================================================-->
+ <patternset id="resource.files">
+ <include name="boot/**/*.txt"/>
+ <include name="boot/**/*.xml"/>
+ <include name="boot/**/*.xsd"/>
+ <include name="images/**/*.gif"/>
+ <include name="images/**/*.jpg"/>
+ <include name="images/**/*.png"/>
+ </patternset>
+
+ <!--===================================================================-->
+ <!-- Prepare the build (takes the timestamp see: Ant1.3 docs) -->
+ <!--===================================================================-->
+ <target name="prepare">
+ <tstamp/>
+ </target>
+
+ <target name="clean" description="cleans up the build directories">
+ <delete dir="${build.dir}"/>
+ </target>
+ <target name="rebuild" depends="clean, jar" description="deletes and recompiles the whole of cristal2"/>
+ <target name="jar" depends="resources" description="make jar">
+ <jar basedir="${build.dir}" includes="**" jarfile="cristaldev.jar"/>
+ </target>
+ <!--===================================================================-->
+ <!-- Assembles cristal2 resources -->
+ <!--===================================================================-->
+ <target name="resources" depends="prepare" description="Moves all resources to the build directory for the Resource class to read">
+ <mkdir dir="${build.dir}/${res.dir}"/>
+ <copy todir="${build.dir}/${res.dir}">
+ <fileset dir="${resource.dir}">
+ <patternset refid="resource.files"/>
+ </fileset>
+ </copy>
+ </target>
+
+</project>