Add .gitignore.
[fits.git] / build.xml
1 <?xml version="1.0"?>
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">
8     </path>
9     <path id="build.class.path">
10       <!--pathelement location="JUNIT.JAR"/-->
11       <pathelement location="/usr/share/junit-4/lib/junit.jar"/>
12     </path>
13     <path id="test.class.path">
14       <pathelement location="${build}"/>
15     </path>
16   </target>
17   <target name="all" depends="jar,javadoc"
18           description="Pseudo-target that builds JAR and Javadoc">
19   </target>
20   <target name="build" depends="init"
21           description="Compiles the classes">
22     <mkdir dir="${build}"/>
23     <javac destdir="${build}" srcdir="${src}" debug="true"
24            deprecation="true" includeantruntime="false">
25       <classpath refid="project.class.path"/>
26       <classpath refid="build.class.path"/>
27     </javac>
28   </target>
29   <target name="test" depends="build">
30     <junit>
31       <classpath refid="project.class.path" />
32       <classpath refid="test.class.path"/>
33       <formatter type="brief" usefile="false" />
34       <batchtest>
35         <fileset dir="${build}" includes="**/test/*.class" />
36       </batchtest>
37     </junit>
38   </target>
39   <target name="javadoc" depends="init"
40           description="Generates Javadoc API documentation">
41     <mkdir dir="${doc}/api"/>
42     <javadoc packagenames="*"
43              sourcepath="${src}" destdir="${doc}/api"
44              author="true"       version="true"
45              use="true"          private="true"/>
46   </target>
47   <target name="jar" depends="build"
48           description="Builds a project JAR file">
49     <jar basedir="${build}" jarfile="${basedir}/fits.jar">
50       <manifest>
51         <attribute name="Version" value="1.06.0"/>
52         <attribute name="Main-Class"
53                    value="fits"/>
54       </manifest>
55     </jar>
56   </target>
57   <target name="clean" depends="init"
58           description="Erase all generated files and dirs">
59     <delete dir="${build}" verbose="true"/>
60     <delete dir="${doc}/api" verbose="true"/>
61     <delete file="fits.jar" verbose="true"/>
62   </target>
63 </project>