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"/>
30 <copy todir="${build}">
32 <fileset dir="${src}" includes="**/test/test.fits*"/>
33 <!--fileset dir="${src}/nom/tam/fits/comments.txt"/-->
34 <globmapper from="*" to="*"/>
38 <target name="test" depends="build">
40 <classpath refid="project.class.path" />
41 <classpath refid="test.class.path"/>
42 <formatter type="brief" usefile="false" />
44 <fileset dir="${build}" includes="**/test/*.class" />
48 <target name="javadoc" depends="init"
49 description="Generates Javadoc API documentation">
50 <mkdir dir="${doc}/api"/>
51 <javadoc packagenames="*"
52 sourcepath="${src}" destdir="${doc}/api"
53 author="true" version="true"
54 use="true" private="true"/>
56 <target name="jar" depends="build"
57 description="Builds a project JAR file">
58 <jar basedir="${build}" jarfile="${basedir}/fits.jar">
60 <attribute name="Version" value="1.06.0"/>
61 <attribute name="Main-Class"
66 <target name="clean" depends="init"
67 description="Erase all generated files and dirs">
68 <delete dir="${build}" verbose="true"/>
69 <delete dir="${doc}/api" verbose="true"/>
70 <delete file="fits.jar" verbose="true"/>