-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
60 lines (48 loc) · 2.02 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
<?xml version="1.0" standalone="yes"?>
<project name="underground-ade" default="dist" basedir=".">
<!-- load external property set -->
<property file="default.properties" />
<!-- classpath -->
<path id="classpath">
<fileset dir="${dir.lib}" includes="*.jar" />
</path>
<!-- build number -->
<buildnumber file="build.num" />
<tstamp>
<format property="date" pattern="yyyy-MM-dd" />
<format property="time" pattern="HH:mm:ss" />
</tstamp>
<target name="clean" description="clean up">
<!-- clean up build environment -->
<delete dir="${dir.build}" />
<delete dir="${dir.target}" />
</target>
<target name="dist" depends="clean" description="generate the Underground ADE module file">
<!-- create the build environment -->
<mkdir dir="${dir.build.classes}" />
<mkdir dir="${dir.dest}" />
<!-- compile the source code in ${dir.src} and ${dir.src-gen} -->
<javac includeantruntime="false" classpathref="classpath" srcdir="${dir.src-gen}" destdir="${dir.build.classes}" debug="on" />
<javac includeantruntime="false" classpathref="classpath" srcdir="${dir.src}" excludes="sg/gov/tech/citygml/underground/test/**" destdir="${dir.build.classes}" debug="on" />
<!-- copy resources -->
<copy todir="${dir.build.classes}">
<fileset dir="${dir.src}" includes="**/*.xsd" />
</copy>
<!-- copy services file -->
<copy todir="${dir.build.classes}/META-INF">
<fileset dir="${dir.src}/META-INF" includes="**/*" />
</copy>
<!-- put everything in ${build} into .jar file -->
<jar jarfile="${dir.dest}/${ade.jar}" basedir="${dir.build.classes}">
<manifest>
<attribute name="Build-Id" value="${ade.name}-${ade.version}" />
<attribute name="Build-Date" value="${date} ${time}" />
<attribute name="Implementation-Title" value="${ade.description}" />
<attribute name="Implementation-Version" value="${ade.version}+${build.number}" />
<attribute name="Implementation-Vendor" value="${vendor.shortinfo}" />
</manifest>
</jar>
<!-- clean up -->
<delete dir="${dir.build}" />
</target>
</project>