forked from nloyola/biobank
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-eclipse.xml
344 lines (318 loc) · 13.3 KB
/
build-eclipse.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<?xml version="1.0" encoding="utf-8"?>
<!--
Overall build file
use command "ant -projecthelp" to display the targets.
-->
<project name="biobank-eclipse" basedir=".">
<target name="java-client-manifest">
<manifest file="${eclipse.proj.dir}/META-INF/MANIFEST.MF" mode="update">
<attribute name="Bundle-Version" value="${java.client.version.num}" />
</manifest>
<fixcrlf srcdir="${eclipse.proj.dir}/META-INF"
eol="lf"
eof="asis">
<include name="**/*.MF" />
</fixcrlf>
<propertyfile file="eclipse_ws/biobank2/about.mappings">
<entry key="0" value="${java.client.version.num}" />
</propertyfile>
</target>
<target name="biobank-product-version-modify">
<tempfile property="tmp.file" destdir="${java.io.tmpdir}"
prefix="biobank2.product" />
<xslt in="${eclipse.proj.dir}/biobank2.product" out="${tmp.file}"
style="scripts/biobank-product.xsl">
<param name="version" expression="${java.client.version.num}" />
</xslt>
<copy file="${tmp.file}" tofile="${eclipse.proj.dir}/biobank2.product"
overwrite="true"/>
</target>
<target name="biobank-feature-core-version-modify">
<tempfile property="tmp.file" destdir="${java.io.tmpdir}"
prefix="biobank2.feature.core" />
<xslt in="${eclipse.workspace.dir}/biobank2.feature.core/feature.xml" out="${tmp.file}"
style="scripts/biobank-feature.xsl">
<param name="version" expression="${java.client.version.num}" />
</xslt>
<copy file="${tmp.file}" tofile="${eclipse.workspace.dir}/biobank2.feature.core/feature.xml"
overwrite="true"/>
</target>
<target name="biobank-feature-platform-version-modify">
<tempfile property="tmp.file" destdir="${java.io.tmpdir}"
prefix="biobank2.feature.platform" />
<xslt in="${eclipse.workspace.dir}/biobank2.feature.platform/feature.xml" out="${tmp.file}"
style="scripts/biobank-feature.xsl">
<param name="version" expression="${java.client.version.num}" />
</xslt>
<copy file="${tmp.file}" tofile="${eclipse.workspace.dir}/biobank2.feature.platform/feature.xml"
overwrite="true"/>
</target>
<target name="biobank-version-modify">
<antcall target="biobank-product-version-modify" />
<antcall target="biobank-feature-core-version-modify" />
<antcall target="biobank-feature-platform-version-modify" />
<antcall target="java-client-manifest" />
</target>
<path id="eclipse-jars">
<fileset dir="${env.ECLIPSE_HOME}/plugins">
<include name="*.jar" />
</fileset>
</path>
<path id="biobank-common-client-jars">
<fileset dir="${eclipse.proj.dir.common}/lib/client">
<include name="*.jar" />
</fileset>
</path>
<path id="biobank-common-server-jars">
<fileset dir="${eclipse.proj.dir.common}/lib/server">
<include name="*.jar" />
</fileset>
</path>
<path id="biobank-common-gui-common-jars">
<fileset dir="${eclipse.proj.dir.gui.common}/lib">
<include name="*.jar" />
</fileset>
</path>
<path id="biobank-mvp-jars">
<fileset dir="${eclipse.proj.dir.mvp}/lib">
<include name="*.jar" />
</fileset>
</path>
<path id="eclipse-compiler">
<pathelement location="${lib.dir}/build/ecj.jar"/>
</path>
<target name="eclipse-biobank-common" depends="deploy-eclipse">
<javac
compiler="org.eclipse.jdt.core.JDTCompilerAdapter"
includeantruntime="false"
srcdir="${eclipse.proj.dir.common}/src"
destdir="${eclipse.proj.dir.common}/bin">
<compilerclasspath refid="eclipse-compiler" />
<compilerarg line="${build.compiler.arg}"/>
<!-- compilerarg value="-Xlint:all"/ -->
<!-- compilerarg value="-Xlint:unchecked"/ -->
<!-- compilerarg value="-Werror"/ -->
<classpath refid="biobank-common-client-jars" />
<classpath refid="biobank-common-server-jars" />
</javac>
</target>
<target name="eclipse-biobank-gui-common" depends="eclipse-biobank-common">
<javac
compiler="org.eclipse.jdt.core.JDTCompilerAdapter"
includeantruntime="false"
srcdir="${eclipse.proj.dir.gui.common}/src"
destdir="${eclipse.proj.dir.gui.common}/bin">
<compilerclasspath refid="eclipse-compiler" />
<compilerarg line="${build.compiler.arg}"/>
<classpath refid="eclipse-jars" />
<classpath refid="biobank-common-client-jars" />
<classpath>
<pathelement path="${eclipse.proj.dir.common}/bin" />
</classpath>
</javac>
</target>
<target name="eclipse-biobank-mvp" depends="eclipse-biobank-common">
<javac
compiler="org.eclipse.jdt.core.JDTCompilerAdapter"
includeantruntime="false"
srcdir="${eclipse.proj.dir.mvp}/src"
destdir="${eclipse.proj.dir.mvp}/bin">
<compilerclasspath refid="eclipse-compiler" />
<compilerarg line="${build.compiler.arg}"/>
<classpath refid="eclipse-jars" />
<classpath refid="biobank-common-client-jars" />
<classpath refid="biobank-mvp-jars" />
<classpath>
<pathelement path="${eclipse.proj.dir.common}/bin" />
</classpath>
</javac>
</target>
<target name="eclipse-scanner-config" depends="eclipse-biobank-common">
<javac
compiler="org.eclipse.jdt.core.JDTCompilerAdapter"
includeantruntime="false"
srcdir="${eclipse.workspace.dir}/scannerConfig/src"
destdir="${eclipse.workspace.dir}/scannerConfig/bin">
<compilerclasspath refid="eclipse-compiler" />
<compilerarg line="${build.compiler.arg}"/>
<classpath refid="eclipse-jars" />
<classpath refid="biobank-common-client-jars" />
<classpath>
<pathelement path="${eclipse.proj.dir.common}/bin" />
<fileset dir="${eclipse.workspace.dir}/scannerConfig/lib">
<include name="*.jar" />
</fileset>
</classpath>
</javac>
</target>
<target name="eclipse-biobank"
depends="resolve,eclipse-biobank-common,eclipse-biobank-gui-common,eclipse-biobank-mvp,eclipse-scanner-config">
<javac
compiler="org.eclipse.jdt.core.JDTCompilerAdapter"
includeantruntime="false"
srcdir="${eclipse.proj.dir}/src"
destdir="${eclipse.proj.dir}/bin">
<compilerclasspath refid="eclipse-compiler" />
<compilerarg line="${build.compiler.arg}"/>
<classpath refid="biobank-common-client-jars" />
<classpath refid="biobank-common-server-jars" />
<classpath refid="biobank-mvp-jars" />
<classpath>
<pathelement path="${eclipse.proj.dir.common}/bin" />
<pathelement path="${eclipse.proj.dir.gui.common}/bin" />
<pathelement path="${eclipse.proj.dir.mvp}/bin" />
<pathelement path="${eclipse.workspace.dir}/scannerConfig/bin" />
<pathelement path="${eclipse.workspace.dir}/labelPrinter/bin" />
<fileset dir="${eclipse.proj.dir}/lib">
<include name="*.jar" />
</fileset>
<fileset dir="${eclipse.proj.dir.gui.common}/lib">
<include name="*.jar" />
</fileset>
</classpath>
<classpath refid="eclipse-jars" />
</javac>
</target>
<target name="eclipse-label-printer" depends="eclipse-biobank">
<javac
compiler="org.eclipse.jdt.core.JDTCompilerAdapter"
includeantruntime="false"
srcdir="${eclipse.workspace.dir}/labelPrinter/src"
destdir="${eclipse.workspace.dir}/labelPrinter/bin">
<compilerclasspath refid="eclipse-compiler" />
<compilerarg line="${build.compiler.arg}"/>
<classpath refid="eclipse-jars" />
<classpath refid="biobank-common-client-jars" />
<classpath refid="biobank-common-gui-common-jars" />
<classpath>
<pathelement path="${eclipse.proj.dir.common}/bin" />
<pathelement path="${eclipse.proj.dir.gui.common}/bin" />
<pathelement path="${eclipse.proj.dir}/bin" />
<fileset dir="${eclipse.workspace.dir}/labelPrinter/lib">
<include name="*.jar" />
</fileset>
</classpath>
</javac>
</target>
<target name="eclipse-biobank-tools" depends="eclipse-biobank">
<javac
compiler="org.eclipse.jdt.core.JDTCompilerAdapter"
includeantruntime="false"
srcdir="${eclipse.proj.dir.tools}/src"
destdir="${eclipse.proj.dir.tools}/bin">
<compilerclasspath refid="eclipse-compiler" />
<compilerarg line="${build.compiler.arg}"/>
<classpath refid="biobank-common-client-jars" />
<classpath refid="biobank-common-server-jars" />
<classpath>
<pathelement path="${eclipse.proj.dir.common}/bin" />
<fileset dir="${eclipse.proj.dir.tools}/lib">
<include name="*.jar" />
</fileset>
</classpath>
</javac>
</target>
<path id="biobank.cli.classpath">
<fileset refid="biobank.common.client.build.classpath" />
<fileset refid="biobank.common.server.build.classpath" />
<fileset dir="${eclipse.proj.dir.tools}/lib" includes="**/*.jar" />
<fileset dir="${eclipse.proj.dir.common}/lib/server" includes="supercsv.jar" />
</path>
<target name="biobank-cli" depends="eclipse-biobank-tools">
<delete dir="${output.biobank.cli.dir}" />
<mkdir dir="${output.biobank.cli.dir}" />
<copy todir="${output.biobank.cli.dir}/lib">
<fileset refid="biobank.common.client.build.classpath" />
</copy>
<copy todir="${output.biobank.cli.dir}/lib">
<fileset refid="biobank.common.server.build.classpath" />
</copy>
<copy todir="${output.biobank.cli.dir}/lib">
<fileset dir="${eclipse.proj.dir.common}/lib/server"
includes="supercsv.jar" />
</copy>
<copy todir="${output.biobank.cli.dir}/lib">
<fileset dir="${eclipse.proj.dir.tools}/lib" includes="**/*.jar" />
</copy>
<copy todir="${output.biobank.cli.dir}">
<fileset dir="${eclipse.proj.dir.tools}/bin" includes="log4j.properties" />
</copy>
<copy todir="${output.biobank.cli.dir}">
<fileset dir="${eclipse.proj.dir.common}/bin"
includes="application-config-client*.xml,
ehcache.xml,
hibernate.cfg.xml" />
</copy>
<pathconvert pathsep=" "
property="biobank-cli-classpath"
refid="biobank.cli.classpath">
<map from="${basedir}/${eclipse.proj.dir.common}/lib/client/" to="./lib/" />
<map from="${basedir}/${eclipse.proj.dir.common}/lib/server/" to="./lib/" />
<map from="${basedir}/${eclipse.proj.dir.common}/bin/" to="./lib/" />
</pathconvert>
<jar destfile="${output.biobank.cli.dir}/BiobankCli.jar">
<manifest>
<attribute name="Implementation-Version" value="${java.client.version.num}" />
<attribute name="Main-Class"
value="edu.ualberta.med.biobank.tools.cli.BiobankCli"/>
<attribute name="Class-Path" value=". ${biobank-cli-classpath}" />
</manifest>
<fileset dir="${eclipse.proj.dir.common}/bin"
includes="edu/ualberta/med/biobank/server/applicationservice/**/*.class,
edu/ualberta/med/biobank/server/query/**/*.class,
edu/ualberta/med/biobank/util/**/*.class,
edu/ualberta/med/biobank/validator/**/*.class,
edu/ualberta/med/biobank/i18n/**/*.class,
edu/ualberta/med/biobank/Common*.class" />
<fileset dir="${eclipse.proj.dir.common}/bin"
includes="edu/ualberta/med/biobank/model/**/*.class" />
<fileset dir="${eclipse.proj.dir.common}/bin"
includes="edu/ualberta/med/biobank/common/**/*.class" />
<fileset dir="${eclipse.proj.dir.common}/bin"
includes="edu/ualberta/med/biobank/client/**/*.class" />
<fileset dir="${eclipse.proj.dir.tools}/bin" includes="**/*.class" />
</jar>
</target>
<target name="biobank-cli-dist" depends="biobank-cli"
description="builds a distributable JAR for the Biobank CLI.">
<zip destfile="BiobankCli-${java.client.version.num}.zip" basedir="${output.biobank.cli.dir}" />
</target>
<target name="eclipse-biobank-tests" depends="eclipse-biobank">
<javac
compiler="org.eclipse.jdt.core.JDTCompilerAdapter"
includeantruntime="false"
srcdir="${eclipse.proj.dir.tests}/src"
destdir="${eclipse.proj.dir.tests}/bin">
<compilerclasspath refid="eclipse-compiler" />
<compilerarg line="${build.compiler.arg}"/>
<classpath refid="biobank-common-client-jars" />
<classpath refid="biobank-common-server-jars" />
<classpath refid="biobank-mvp-jars" />
<classpath>
<pathelement path="${eclipse.proj.dir.common}/bin" />
<pathelement path="${eclipse.proj.dir.mvp}/bin" />
<pathelement path="${eclipse.proj.dir}/bin" />
<fileset dir="${env.ECLIPSE_HOME}/plugins">
<include name="**/junit.jar" />
</fileset>
<fileset dir="${eclipse.proj.dir.tests}/lib">
<include name="*.jar" />
</fileset>
</classpath>
</javac>
</target>
<target name="eclipse-projects" depends="eclipse-label-printer,eclipse-biobank-tools,eclipse-biobank-tests" />
<target name="clean-eclipse-projects" depends="clean-jars">
<delete failonerror="false">
<fileset dir="${eclipse.proj.dir.common}/bin" includes="**/*"/>
<fileset dir="${eclipse.proj.dir.gui.common}/bin" includes="**/*"/>
<fileset dir="${eclipse.proj.dir.mvp}/bin" includes="**/*"/>
<fileset dir="${eclipse.workspace.dir}/scannerConfig/bin" includes="**/*"/>
<fileset dir="${eclipse.proj.dir}/bin" includes="**/*"/>
<fileset dir="${eclipse.workspace.dir}/labelPrinter/bin" includes="**/*"/>
<fileset dir="${eclipse.proj.dir.tools}/bin" includes="**/*"/>
<fileset dir="${eclipse.proj.dir.tests}/bin" includes="**/*"/>
</delete>
<delete dir="${temp.dir}" />
</target>
</project>