added ant buildfile
authorMart Lubbers <mart@martlubbers.net>
Wed, 18 Jun 2014 17:52:09 +0000 (19:52 +0200)
committerMart Lubbers <mart@martlubbers.net>
Wed, 18 Jun 2014 17:52:09 +0000 (19:52 +0200)
.gitignore
build.xml [new file with mode: 0644]

index c65f2ea..a7ea31e 100644 (file)
@@ -1,4 +1,3 @@
 build/*
-build.xml
 dist/*
 *.class
diff --git a/build.xml b/build.xml
new file mode 100644 (file)
index 0000000..d5a9cc0
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,41 @@
+<project name="MyProject" default="dist" basedir=".">
+       <description>
+               simple example build file
+       </description>
+       <!-- set global properties for this build -->
+       <property name="src" location="src"/>
+       <property name="build" location="build"/>
+       <property name="dist"  location="dist"/>
+
+       <target name="init">
+               <!-- Create the time stamp -->
+               <tstamp/>
+               <!-- Create the build directory
+                                                                                                                                                                                                structure used by compile -->
+               <mkdir dir="${build}"/>
+       </target>
+
+       <target name="compile" depends="init"
+               description="compile the source " >
+               <!-- Compile the java code from ${src} into ${build} -->
+               <javac srcdir="." destdir="${build}"/>
+       </target>
+
+       <target name="dist" depends="compile"
+               description="generate the distribution" >
+               <!-- Create the distribution
+                                                                                                                                                                                                directory -->
+               <mkdir dir="${dist}/lib"/>
+
+               <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file
+                                                -->
+               <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
+       </target>
+
+       <target name="clean"
+               description="clean up" >
+               <!-- Delete the ${build} and ${dist} directory trees -->
+               <delete dir="${build}"/>
+               <delete dir="${dist}"/>
+       </target>
+</project>