1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="PIMStuff" default="build" basedir=".">
4 <property name="src" location="src" />
5 <property name="build" location="bin" />
6 <property name="main" value="de.j32.pimstuff.Main" />
7 <property name="lib" value="libs" />
8 <property name="test" value="tests" />
10 <target name="makedirs">
11 <mkdir dir="${build}" />
15 <fileset dir="${lib}">
16 <include name="**/*.jar" />
20 <fileset id="tests" dir="${test}">
21 <include name="**/*.java" />
24 <target name="build" depends="makedirs" description="Compile project to ${build} directory">
25 <javac srcdir="${src}" destdir="${build}" classpathref="classpath" />
28 <target name="clean" description="Clean up ${build} directory">
30 <fileset dir="${build}" />
34 <target name="run" depends="build" description="Start main class">
35 <java fork="true" classpath="${build}" classpathref="classpath" classname="${main}" />
38 <target name="build-tests" depends="build" description="Compile tests">
39 <javac srcdir="${test}" destdir="${build}" classpath="${build}" classpathref="classpath" />
42 <target name="test" depends="build-tests" description="Run JUnit tests">
43 <junit fork="true" printsummary="withOutAndErr" haltonerror="true">
45 <path refid="classpath" />
46 <pathelement path="${build}" />
47 <pathelement path="${test}" />
50 <fileset refid="tests" />