d5a9cc08b2cf15f92eb14f9f39decee0c53fa3c7
[co1314.git] / build.xml
1 <project name="MyProject" default="dist" basedir=".">
2 <description>
3 simple example build file
4 </description>
5 <!-- set global properties for this build -->
6 <property name="src" location="src"/>
7 <property name="build" location="build"/>
8 <property name="dist" location="dist"/>
9
10 <target name="init">
11 <!-- Create the time stamp -->
12 <tstamp/>
13 <!-- Create the build directory
14 structure used by compile -->
15 <mkdir dir="${build}"/>
16 </target>
17
18 <target name="compile" depends="init"
19 description="compile the source " >
20 <!-- Compile the java code from ${src} into ${build} -->
21 <javac srcdir="." destdir="${build}"/>
22 </target>
23
24 <target name="dist" depends="compile"
25 description="generate the distribution" >
26 <!-- Create the distribution
27 directory -->
28 <mkdir dir="${dist}/lib"/>
29
30 <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file
31 -->
32 <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
33 </target>
34
35 <target name="clean"
36 description="clean up" >
37 <!-- Delete the ${build} and ${dist} directory trees -->
38 <delete dir="${build}"/>
39 <delete dir="${dist}"/>
40 </target>
41 </project>