1 <project name="Applet Bots" default="all" basedir=".">
3 ANT build file to build applet bots project.
6 <!-- set global properties for this build -->
7 <property name="dist.dir" location="dist"/>
8 <property name="src.dir" location="src"/>
9 <property name="lib.dir" location="lib"/>
10 <property name="build.dir" location="classes"/>
11 <property name="test.build.dir" location="test-classes"/>
12 <property name="jar.dir" location="${dist.dir}"/>
13 <property name="javadoc.dir" location="${dist.dir}/javadoc"/>
16 <!-- Create the time stamp -->
20 <target name="compile" depends="init" description="compile the code">
21 <mkdir dir="${build.dir}"/>
22 <javac srcdir="${src.dir}" destdir="${build.dir}">
23 <exclude name="**/*Test.java"/>
27 <target name="compile-tests" depends="compile" description="compile the tests">
28 <mkdir dir="${test.build.dir}"/>
29 <javac srcdir="${src.dir}" destdir="${test.build.dir}">
30 <classpath path="${build.dir}"/>
32 <fileset dir="${lib.dir}" includes="*.jar"/>
34 <include name="**/*Test.java"/>
38 <target name="jar" depends="compile" description="create the jar file">
39 <mkdir dir="${jar.dir}"/>
40 <jar jarfile="${jar.dir}/appletbots.jar" basedir="${build.dir}"/>
43 <target name="javadoc" depends="init" description="create api documentation">
44 <mkdir dir="${javadoc.dir}"/>
46 destdir="${javadoc.dir}"
47 sourcepath="${src.dir}"
48 packagenames="appletbots.*"
52 windowtitle="Applet Bots API">
53 <excludepackage name="**/test"/>
57 <target name="run-tests" depends="compile-tests">
58 <junit fork="on" haltonfailure="on" printsummary="on">
59 <classpath path="${lib.dir}/junit.jar"/>
60 <classpath path="${build.dir}"/>
61 <classpath path="${test.build.dir}"/>
62 <formatter type="plain" usefile="no"/>
64 <fileset dir="${test.build.dir}">
65 <include name="**/*Test.class"/>
71 <target name="all" depends="run-tests, jar, javadoc">
72 <antcall target="clean"/>
75 <target name="clean" description="clean up compiled classes">
76 <delete dir="${build.dir}"/>
77 <delete dir="${test.build.dir}"/>
80 <target name="clean-all" description="clean up everything">
81 <delete dir="${dist.dir}"/>