-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
70 lines (56 loc) · 2.22 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
<?xml version="1.0" standalone="yes"?>
<project name="dynamizer-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 Dynamizer 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}" destdir="${dir.build.classes}" debug="on" />
<!-- copy resources -->
<copy todir="${dir.build.classes}">
<fileset dir="${dir.src}"/>
</copy>
<!-- copy schema-mapping file -->
<copy todir="${dir.dest}/schema-mapping">
<fileset dir="${dir.schema-mapping}" includes="**/*" />
</copy>
<!-- copy sql files -->
<copy todir="${dir.dest}/sql">
<fileset dir="${dir.sql}" includes="**/*" />
</copy>
<!-- copy services file -->
<copy todir="${dir.build.classes}/META-INF">
<fileset dir="${basedir}/META-INF" includes="**/*" />
</copy>
<!-- put everything in ${build} into .jar file -->
<jar jarfile="${dir.dest.lib}/${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>