-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
108 lines (83 loc) · 3.46 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0" encoding="UTF-8"?>
<project name="llg" default="loader">
<property name="main" value="llg.Main"/>
<property name="src" value="src"/>
<property name="bin" value="bin"/>
<property name="lib" value="lib"/>
<property name="dst" value="../web"/>
<available file="${dst}" type="dir" property="available.dst" />
<property name="web.codebase" value="http://llg.googlecode.com/svn/web/"/>
<property name="compiler.source" value="1.5"/>
<property name="compiler.target" value="1.5"/>
<property name="compiler.debug" value="true"/>
<property name="compiler.encoding" value="utf-8"/>
<property file="build.version"/>
<property name="this.version" value="${version.major}.${version.minor}.${version.build}"/>
<path id="lib.fv3.jar.path">
<fileset dir="${lib}">
<include name="**/fv3-*.jar" />
</fileset>
</path>
<path id="lib.path">
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${dst}">
<include name="**/*.jar" />
<exclude name="**/*-natives-*.jar" />
</fileset>
</path>
<path id="jnlp.loader.jar">
<fileset dir="loader">
<include name="**/jnlp-loader-*.jar"/>
</fileset>
</path>
<property name="target.jar" value="${dst}/${ant.project.name}-${this.version}.jar"/>
<property name="target.jnlp" value="${dst}/${ant.project.name}-${this.version}.jnlp"/>
<property name="target-loader.jar" value="${dst}/${ant.project.name}-loader-${this.version}.jar"/>
<target name="loader" depends="jar" description="Package target jar.">
<delete file="${target-loader.jar}"/>
<delete file="main.jnlp"/>
<copy tofile="main.jnlp" file="${target.jnlp}" />
<jar jarfile="${target-loader.jar}">
<manifest>
<attribute name="Main-Class" value="loader.Main"/>
</manifest>
<fileset file="main.jnlp"/>
<zipfileset src="${toString:jnlp.loader.jar}"/>
</jar>
<delete file="main.jnlp"/>
</target>
<target name="jar" depends="compile" description="Package bin to target jar, clean bin.">
<delete file="${target.jar}"/>
<jar jarfile="${target.jar}" basedir="${bin}" >
<zipfileset src="${toString:lib.fv3.jar.path}" excludes="META-INF/**"/>
</jar>
<delete dir="${bin}"/>
<copy tofile="${target.jnlp}" file="ver/pkg/llg.jnlp" filtering="true" overwrite="true">
<filterset>
<filter token="ProjectName" value="${ant.project.name}"/>
<filter token="ProjectVersion" value="${this.version}"/>
<filter token="ProjectMainClass" value="${main}"/>
<filter token="ProjectCodebase" value="${jnlp.codebase}"/>
</filterset>
</copy>
</target>
<target name="compile" description="Compile src to bin">
<mkdir dir="${bin}"/>
<copy todir="${bin}">
<fileset dir="${src}" includes="**/*.properties"/>
<fileset dir="${src}" includes="**/*.txt"/>
<fileset dir="${src}" includes="**/*.xml"/>
</copy>
<javac srcdir="${src}" destdir="${bin}" debug="${compiler.debug}" encoding="${compiler.encoding}"
classpathref="lib.path" source="${compiler.source}" target="${compiler.target}">
</javac>
</target>
<target name="clean" description="Delete products">
<delete dir="${bin}"/>
</target>
<target name="cleanb" depends="clean" description="Clean build">
<antcall target="loader"/>
</target>
</project>