1 <project name=
"MyProject" default=
"dist" basedir=
".">
3 simple example build file
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"/>
11 <!-- Create the time stamp -->
13 <!-- Create the build directory
14 structure used by compile -->
15 <mkdir dir=
"${build}"/>
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}"/>
24 <target name=
"dist" depends=
"compile"
25 description=
"generate the distribution" >
26 <!-- Create the distribution
28 <mkdir dir=
"${dist}/lib"/>
30 <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file
32 <jar jarfile=
"${dist}/lib/MyProject-${DSTAMP}.jar" basedir=
"${build}"/>
36 description=
"clean up" >
37 <!-- Delete the ${build} and ${dist} directory trees -->
38 <delete dir=
"${build}"/>
39 <delete dir=
"${dist}"/>