Merge branch anton with master for v2.0.
[ailab2.git] / build.xml
blob5cedbd6eb6c140b96077c5e26a1b1b09c3c9ca5f
1 <?xml version="1.0" encoding="utf-8"?>
2 <project name="AiLab2" default="compile" basedir=".">
3   <property name="build.dir" location="bin"/>
4   <property name="build.prod.dir" location="${build.dir}/prod"/>
5   <property name="build.test.dir" location="${build.dir}/test"/>
6   <property name="doc.dir" location="doc"/>
7   <property name="src.dir" location="src"/>
8   <property name="lib.dir" location="lib"/>
9   <property name="test.dir" location="test"/>
10   <property name="index.dir" location="index"/>
11   <path id="project.classpath">
12     <pathelement location="${build.prod.dir}" />
13     <pathelement location="${build.test.dir}" />
14     <fileset dir="${lib.dir}">
15       <include name="*.jar"/>
16     </fileset>
17   </path>
19   <target name="prepare">
20     <mkdir dir="${build.prod.dir}"/>
21     <mkdir dir="${build.test.dir}"/>
22   </target>
24   <target name="compile" depends="prepare">
25     <javac srcdir="${src.dir}" destdir="${build.prod.dir}">
26       <classpath refid="project.classpath" />
27       <!-- <compilerarg value="-Xlint:unchecked"/> -->
28     </javac>
29   </target>
31   <target name="compile-tests" depends="compile">
32     <javac srcdir="${test.dir}" destdir="${build.test.dir}">
33       <classpath refid="project.classpath" />
34     </javac>
35   </target>
37   <target name="test" depends="compile-tests">
38     <junit haltonfailure="true">
39       <classpath refid="project.classpath" />
40       <formatter type="plain" usefile="false" />
41       <batchtest>
42         <fileset dir="${build.test.dir}"
43                  includes="**/*Test.class" />
44       </batchtest>
45       <sysproperty key="doc.dir" value="${doc.dir}" />
46       <sysproperty key="index.dir" value="${index.dir}" />
47     </junit>
48   </target>
50   <target name="javadoc" description="Generaties javadoc">
51     <javadoc destdir="${doc.dir}" charset="UTF-8">
52       <fileset dir="${src.dir}/" includes="**/*.java"/>
53       <classpath refid="project.classpath" />
54     </javadoc>
55   </target>
56 </project>