-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
88 lines (73 loc) · 2.56 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<project name="KilCli" default="compile" basedir=".">
<description>
Kilcli Build File
</description>
<property name="path.src" location="src" />
<property name="path.build" location="bin" />
<property name="path.build.classes" location="bin/classes" />
<property name="path.src.resources" location="src/resources" />
<property name="path.dist" location="dist" />
<property name="path.release" location="release" />
<property name="path.build.lib" value="bin/lib" />
<property name ="path.src.lib" value="src/lib" />
<path id="compile.classpath">
<fileset dir="${path.build}">
<include name="lib/*.jar"/>
</fileset>
</path>
<target name="init">
<tstamp/>
<mkdir dir="${path.build}" />
<mkdir dir="${path.build.classes}"/>
<mkdir dir="${path.build.lib}" />
</target>
<target name="compile" depends="init" description="compile the source " >
<copy todir="${path.build.lib}">
<fileset dir="${path.src.lib}"/>
</copy>
<javac srcdir="${path.src}" destdir="${path.build.classes}" target="7" source="7">
<classpath refid="compile.classpath" />
</javac>
<pathconvert property="mf.classpath" pathsep=" " >
<path refid="compile.classpath" />
<chainedmapper>
<flattenmapper/>
<globmapper from="*" to="lib/*"/>
</chainedmapper>
</pathconvert>
<jar destfile="${path.build}/kilcli.jar" basedir="${path.build.classes}">
<manifest>
<attribute name="Main-Class" value="terris.kilcli.KilCli"/>
<attribute name="Class-Path" value="${mf.classpath}" />
</manifest>
</jar>
</target>
<target name="dist" depends="compile"
description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${path.dist}" />
<copy todir="${path.dist}">
<fileset dir="${path.src.resources}" />
</copy>
<copy todir="${path.dist}/lib">
<fileset dir="${path.build.lib}"/>
</copy>
<copy file="${path.build}/kilcli.jar" todir="${path.dist}"/>
</target>
<target name="zip" depends="dist"
description="generate the release zip" >
<zip destfile="${path.release}/kilcli-release.zip"
whenempty="fail"
level="9"
duplicate="fail">
<zipfileset dir="${path.dist}" excludes="**/*.log" prefix="kilcli"/>
</zip>
</target>
<target name="clean"
description="clean up" >
<!-- Delete the output directory trees -->
<delete dir="${path.build}"/>
<delete dir="${path.dist}"/>
<delete dir="${path.release}"/>
</target>
</project>