forked from piona/ant-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
43 lines (34 loc) · 1.53 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
<project name="ant-sample" basedir="." default="build">
<!-- properties -->
<property name="src.dir" value="src"/>
<property name="build.dir" value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.dir" value="${build.dir}/jar"/>
<property name="doc.dir" value="doc"/>
<!-- targets -->
<target name="compile" description="compile project">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}" includeantruntime="false"/>
</target>
<target name="jar" depends="compile" description="generate the distribution jar">
<mkdir dir="${jar.dir}"/>
<jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}">
<manifest>
<attribute name="Main-Class" value="piona.Main"/>
</manifest>
</jar>
</target>
<target name="run" depends="jar" description="run application">
<java jar="${jar.dir}/${ant.project.name}.jar" fork="true"/>
</target>
<target name="build" depends="jar" description="build application"/>
<target name="doc" description="generate documentation">
<mkdir dir="${doc.dir}" />
<javadoc destdir="${doc.dir}" sourcepath="${src.dir}"/>
</target>
<target name="clean" description="clean up build files">
<delete dir="${build.dir}"/>
<delete dir="${doc.dir}" />
</target>
<target name="rebuild" depends="clean,build" description="rebuild application"/>
</project>