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"/>
19 <target name="prepare">
20 <mkdir dir="${build.prod.dir}"/>
21 <mkdir dir="${build.test.dir}"/>
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"/> -->
31 <target name="compile-tests" depends="compile">
32 <javac srcdir="${test.dir}" destdir="${build.test.dir}">
33 <classpath refid="project.classpath" />
37 <target name="test" depends="compile-tests">
38 <junit haltonfailure="true">
39 <classpath refid="project.classpath" />
40 <formatter type="plain" usefile="false" />
42 <fileset dir="${build.test.dir}"
43 includes="**/*Test.class" />
45 <sysproperty key="doc.dir" value="${doc.dir}" />
46 <sysproperty key="index.dir" value="${index.dir}" />
50 <target name="javadoc" description="Generaties javadoc">
51 <javadoc destdir="${doc.dir}">
52 <fileset dir="${src.dir}/" includes="**/*.java"/>