-
Notifications
You must be signed in to change notification settings - Fork 0
/
zarlock.xml
132 lines (116 loc) · 4.78 KB
/
zarlock.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<project name="ZARLOCK-2-0" default="dist" basedir=".">
<description>
simple example build file
</description>
<property name="jpa-framework.location" value="../jpa-framework"/>
<path id="jpa-framework.classpath">
<pathelement location="${jpa-framework.location}/dist/jpa-framework.jar"/>
</path>
<path id="libs">
<fileset dir="lib" includes="*.jar"/>
<path refid="jpa-framework.classpath"/>
</path>
<!-- set global properties for this build -->
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.6"/>
<property name="source" value="1.6"/>
<!-- where the source files are -->
<property name="src" location="src" />
<!-- where the compiled classes go -->
<property name="build" location=".build" />
<property name="program" location=".program" />
<!-- where to place the finished jar file -->
<property name="dist" location="dist" />
<property name="logs" location=".program" />
<!-- ========== Dist Target ===================================
The dist target compiles all the source code and creates
a jar file for distribution.
-->
<target name="dist" depends="clean, compile" description="generate the distribution">
<!-- Create the distribution directory -->
<mkdir dir="${program}/lib" />
<jar jarfile="${program}/zarlock.jar" basedir="${build}"/>
<copy includeemptydirs="false" todir="${program}/lib">
<fileset dir="lib" includes="**/*jar" />
</copy>
<copy includeemptydirs="false" todir="${program}/lib">
<fileset file="${jpa-framework.location}/dist/jpa-framework.jar"/>
</copy>
<copy includeemptydirs="false" todir="${program}">
<fileset dir="zarlock-assembly/scripts" />
</copy>
<tar destfile="${dist}/zarlock.tar">
<fileset dir="${program}" excludes="${program}/zarlock.sh"/>
<tarfileset file="${program}/zarlock.sh" mode="555"/>
</tar>
<gzip src="${dist}/zarlock.tar" destfile="${dist}/zarlock.tar.gz"/>
<delete file="${dist}/zarlock.tar"/>
<zip destfile="${dist}/zarlock.zip">
<fileset dir="${program}"/>
</zip>
</target>
<!-- ========== Init Target ====================================
This target initializes the build by creating a time stamp
for use in the jar file name and creating the directory
to hold the compiled classes.
-->
<target name="-init">
<!-- Create the time stamp -->
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
<mkdir dir="${dist}" />
<mkdir dir="${program}" />
<mkdir dir="${dist}/${logs}" />
<copy includeemptydirs="false" todir="${build}">
<fileset dir="resources/java" excludes="**/*.launch, **/*.java" />
</copy>
<copy todir="${program}">
<fileset file="zarlock-assembly/zarlock-splash/splash.bmp"> </fileset>
</copy>
<copy includeemptydirs="false" todir="${build}">
<fileset dir="resources/test" excludes="**/*.launch, **/*.java" />
</copy>
<copy includeemptydirs="false" todir="${build}">
<fileset dir="src/java" excludes="**/*.launch, **/*.java" />
</copy>
<copy includeemptydirs="false" todir="${build}">
<fileset dir="src/test" excludes="**/*.launch, **/*.java" />
</copy>
</target>
<!-- ========== Compile Target =================================
The compile target compiles all files in the source directory
into the build directory.
-->
<target name="compile" depends="-init, compile-subprojects" description="compile the source ">
<javac debug="true" debuglevel="${debuglevel}" destdir="${build}" source="${source}" target="${target}">
<src path="resources/java"/>
<classpath refid="libs"/>
</javac>
<javac debug="true" debuglevel="${debuglevel}" destdir="${build}" source="${source}" target="${target}">
<src path="resources/test"/>
<classpath refid="libs"/>
</javac>
<javac debug="true" debuglevel="${debuglevel}" destdir="${build}" source="${source}" target="${target}">
<src path="src/java"/>
<classpath refid="libs"/>
</javac>
</target>
<target name="compile-subprojects" depends="-init" description="compile the source ">
<ant antfile="${jpa-framework.location}/jpa-framework.xml" inheritAll="false" target="dist">
<propertyset>
<propertyref name="build.compiler"/>
</propertyset>
</ant>
</target>
<!-- ========== Clean Target ====================================
The clean target deletes all files from the build directory
and the dist directory.
-->
<target name="clean" description="clean up">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}" />
<delete dir="${dist}" />
<delete dir="${program}" />
</target>
</project>