Added textures and agent boolean alive
[AntiTD.git] / build.xml
blobb6a478bd54670c2d39f38728220db0e9c517a192
1 <?xml version="1.0" encoding="utf-8"?>
2 <project name="apjava-lab4" default="compile" basedir=".">
3   <!-- Dir Properties -->
4   <property name="build.dir" location="bin"/>
5   <property name="build.main.dir" location="${build.dir}"/>
6   <property name="build.test.dir" location="${build.dir}/test"/>
7   <property name="doc.dir" location="doc"/>
8   <property name="src.dir" location="src"/>
9   <property name="lib.dir" location="lib"/>
10   <property name="test.dir" location="test"/>
11   <property name="test.config.dir" location="${test.dir}/config"/>
12   <property name="index.dir" location="index"/>
14   <!-- Dir program resources -->
15   <property name="src.resources.dir" location="${src.dir}/resources"/>
16   <property name="src.config.dir" location="${src.dir}/config"/>
18   <!-- Classpath -->
19   <path id="project.classpath">
20     <pathelement location="${build.main.dir}" />
21     <pathelement location="${build.test.dir}" />
22     <fileset dir="${lib.dir}">
23       <include name="*.jar"/>
24     </fileset>
25   </path>
27   <!-- Create build-dirs -->
28   <target name="prepare">
29     <mkdir dir="${build.main.dir}"/>
30     <mkdir dir="${build.test.dir}"/>
31   </target>
33   <!-- Remove build files -->
34   <target name="clean">
35     <delete dir="${build.dir}" />
36   </target>
38   <!-- Compile program -->
39   <target name="compile" depends="prepare">
40     <!-- Copy resource dirs -->
41     <copy todir="${build.main.dir}/resources">
42       <fileset dir="${src.resources.dir}"/>
43     </copy>
44     <!--     <copy todir="${build.main.dir}/config"> -->
45     <!--       <fileset dir="${src.config.dir}"/> -->
46     <!--     </copy> -->
48     <!-- Compile source -->
49     <javac srcdir="${src.dir}" destdir="${build.main.dir}" debug="on">
50       <classpath refid="project.classpath" />
51       <!-- <compilerarg value="-Xlint:unchecked"/> -->
52     </javac>
53   </target>
55   <!-- Compile tests -->
56   <target name="compile-tests" depends="compile">
57     <!-- Copy dirs -->
58     <!--     <copy todir="${build.test.dir}/config"> -->
59     <!--       <fileset dir="${test.config.dir}"/> -->
60     <!--     </copy> -->
61     <!--     <copy todir="${build.test.dir}/resources"> -->
62     <!--       <fileset dir="${src.resources.dir}"/> -->
63     <!--     </copy> -->
64     <!-- Compile -->
65     <javac srcdir="${test.dir}" destdir="${build.test.dir}">
66       <classpath refid="project.classpath" />
67     </javac>
68   </target>
70   <!-- Run tests -->
71   <target name="test" depends="compile-tests">
72     <junit haltonfailure="true" dir="${build.test.dir}" fork="true">
73       <classpath refid="project.classpath" />
74       <formatter type="plain" usefile="false" />
75       <batchtest>
76         <!-- Run junit tests on all classes with filenames that end with -->
77         <!-- Test.class -->
78         <fileset dir="${build.test.dir}"
79                  includes="**/*Test.class" />
80       </batchtest>
81       <sysproperty key="doc.dir" value="${doc.dir}" />
82       <sysproperty key="index.dir" value="${index.dir}" />
83     </junit>
84   </target>
86   <!-- Generate javadoc -->
87   <target name="javadoc" description="Generaties javadoc">
88     <javadoc destdir="${doc.dir}">
89       <classpath refid="project.classpath" />
90       <fileset dir="${src.dir}/" includes="**/*.java"/>
91     </javadoc>
92   </target>
94   <!-- Easy way to start the program -->
95   <target name="run" description="Run AntiTD" depends="compile">
96     <java classname="se.umu.cs.dit06ajnajs.AntiTD" fork="true" dir="${build.main.dir}">
97       <classpath refid="project.classpath" />
98       <!-- <arg value="somevalue"/> -->
99     </java>
100   </target>
102   <target name="print-classpath" description="Prints classpath, convenient for export to emacs and jde-mode">
103     <property name="classpath" refid="project.classpath"/>
104     <echo message="-classpath-${classpath}-classpath-"/>
105   </target>
106 </project>