-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
43 lines (35 loc) · 1.5 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="MyProject" default="dist" basedir=".">
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="out" location="out"/>
<property name="lib" location="lib"/>
<property name="data" location="data"/>
<path id="classpath">
<fileset dir="${lib}" includes="**/*.jar"/>
</path>
<target name="init">
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init" description="compile the source ">
<javac includeantruntime="false" srcdir="${src}" destdir="${build}" classpathref="classpath"/>
</target>
<target name="dist" depends="compile" description="generate the distribution">
<mkdir dir="${dist}/lib"/>
<jar jarfile="${dist}/lib/MyProject.jar" basedir="${build}"/>
</target>
<target name="clean" description="clean up">
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="${out}"/>
<delete file="cantest.tar"/>
<delete file="cantest.tar.gz"/>
</target>
<target name="pkg" depends="clean">
<tar destfile="cantest.tar" basedir="${basedir}" includes="src/*, data/*, lib/*, build.xml, run.sh, readme.txt"/>
<gzip src="cantest.tar" destfile="cantest.tar.gz"/>
</target>
<target name="zip" depends="clean">
<zip destfile="cantest.zip" basedir="${basedir}" includes="run.sh,readme.txt,build.xml,src/*,data/*,lib/*"/>
</target>
</project>