This repository has been archived by the owner on Feb 7, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.xml
65 lines (58 loc) · 2.39 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="build" name="java-app-tracker-client">
<property environment="env"/>
<property name="srcDir" value="src/main/java"/>
<property name="tgtDir" value="bin"/>
<property name="docDir" value="doc"/>
<property name="distDir" value="target"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.7"/>
<property name="source" value="1.7"/>
<property name="version.num" value="0.3.1"/>
<property name="basejarname" value= "cf-java-app-tracker-client-${version.num}"/>
<path id="classpathDir">
<pathelement location="${tgtDir}"/>
</path>
<target name="init">
<mkdir dir="${tgtDir}"/>
<mkdir dir="${docDir}"/>
<mkdir dir="${distDir}"/>
</target>
<target name="clean">
<delete dir="${tgtDir}"/>
<delete dir="${docDir}"/>
<delete file="${distDir}/${basejarname}.jar" />
<delete file="${distDir}/${basejarname}-javadoc.jar" />
<delete file="${distDir}/${basejarname}-sources.jar" />
</target>
<target name="build" depends="build-project,build-jar"/>
<target name="cleanall" depends="clean"/>
<target name="build-project" depends="clean,init">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="false" debuglevel="${debuglevel}" destdir="${tgtDir}" source="${source}" target="${target}"
includeantruntime="false">
<src path="${srcDir}"/>
<classpath refid="classpathDir"/>
</javac>
</target>
<target name="doc" depends="init" description="generate javadoc">
<javadoc sourcepath="${srcDir}" destdir="${docDir}">
<classpath refid="classpathDir"/>
</javadoc>
</target>
<target name="build-jar" depends="build-project" description="build jar file">
<jar destfile="${distDir}/${basejarname}.jar">
<fileset dir="${tgtDir}" includes="**/*.class"/>
<metainf dir="." includes="LICENSE.txt"/>
</jar>
</target>
<target name="build-all-jars" depends="build-jar,doc" description="build all jar files">
<!-- javadoc -->
<jar destfile="${distDir}/${basejarname}-javadoc.jar" basedir="${docDir}"/>
<!-- sources -->
<jar destfile="${distDir}/${basejarname}-sources.jar">
<fileset dir="${srcDir}"/>
<fileset dir="." includes="LICENSE.txt"/>
</jar>
</target>
</project>