2 <project name="fits" default="all" basedir=".">
3 <target name="init" description="Sets build properties">
4 <property name="src" value="${basedir}/src"/>
5 <property name="build" value="${basedir}/build"/>
6 <property name="doc" value="${basedir}/doc"/>
7 <path id="project.class.path">
9 <path id="build.class.path">
10 <!--pathelement location="JUNIT.JAR"/-->
11 <pathelement location="/usr/share/junit-4/lib/junit.jar"/>
13 <path id="test.class.path">
14 <pathelement location="${build}"/>
15 <pathelement location="/usr/share/junit-4/lib/junit.jar"/>
16 <pathelement location="/usr/share/hamcrest-core/lib/hamcrest-core.jar"/>
19 <target name="all" depends="jar,javadoc"
20 description="Pseudo-target that builds JAR and Javadoc">
22 <target name="build" depends="init"
23 description="Compiles the classes">
24 <mkdir dir="${build}"/>
25 <javac destdir="${build}" srcdir="${src}" debug="true"
26 deprecation="true" includeantruntime="false">
27 <classpath refid="project.class.path"/>
28 <classpath refid="build.class.path"/>
31 <target name="test" depends="build">
33 <classpath refid="project.class.path" />
34 <classpath refid="test.class.path"/>
35 <formatter type="brief" usefile="false" />
37 <fileset dir="${build}" includes="**/test/*.class" />
41 <target name="javadoc" depends="init"
42 description="Generates Javadoc API documentation">
43 <mkdir dir="${doc}/api"/>
44 <javadoc packagenames="*"
45 sourcepath="${src}" destdir="${doc}/api"
46 author="true" version="true"
47 use="true" private="true"/>
49 <target name="jar" depends="build"
50 description="Builds a project JAR file">
51 <jar basedir="${build}" jarfile="${basedir}/fits.jar">
53 <attribute name="Version" value="1.06.0"/>
54 <attribute name="Main-Class"
59 <target name="clean" depends="init"
60 description="Erase all generated files and dirs">
61 <delete dir="${build}" verbose="true"/>
62 <delete dir="${doc}/api" verbose="true"/>
63 <delete file="fits.jar" verbose="true"/>