-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
424 lines (386 loc) · 18.4 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
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
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
<?xml version="1.0"?>
<!--
* $Id$
* $URL$
*
* This file is part of SBMLsimulator, a Java-based simulator for models
* of biochemical processes encoded in the modeling language SBML.
*
* Copyright (C) 2007-2020 by the University of Tuebingen, Germany.
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation. A copy of the license
* agreement is provided in the file named "LICENSE.txt" included with
* this software distribution and also available online as
* <http://www.gnu.org/licenses/lgpl-3.0-standalone.html>.
*
*
* Author: Andreas Dräger
* Version: $Rev$
-->
<project
name="SBMLsimulator"
default ="minimal_sysbio"
basedir="."
>
<target
name="init"
description="Initialization target"
>
<tstamp>
<format property="YEAR" pattern="yyyy"/>
</tstamp>
<property name="Name" value="SBMLsimulator"/>
<property name="version" value="2.1"/>
<property name="api.version" value="2.1 alpha"/>
<property name="year" value="${YEAR}"/>
<echo message="----------- ${Name} ${version} [${year}] ------------"/>
<echo message="----------- ${TODAY} ------------"/>
<echo message="----------- ${DSTAMP} ${TSTAMP} ------------"/>
<property environment="env"/>
<property name="build.compiler" value="modern"/>
<property name="debug" value="on"/>
<property name="optimize" value="on"/>
<property name="deprecation" value="false"/>
<property name="verbose" value="false"/>
<property name="build.number" value="${DSTAMP}-${TSTAMP}"/>
<property name="build.name" value="${version} (build ${build.number})"/>
<property name="src" value="${basedir}/src"/>
<property name="classes" location="${basedir}/bin"/>
<property name="test" value="${basedir}/test"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="build.src" value="${basedir}/build/src"/>
<property name="build.dest" value="${basedir}/build/classes"/>
<property name="doc" value="${basedir}/doc/api"/>
<property name="lib" value="${basedir}/lib"/>
<property name="dist" value="${basedir}/dist"/>
<property name="dist.dir" value="${dist}/${Name}-${version}"/>
<property name="resources" value="${basedir}/resources"/>
<property name="UUID" value="1cfbffa0-bbcb-4ca9-aa44-bfa4815e935e"/>
<property name="jar.name" value="${Name}_v${version}"/>
<property name="appJar" value="${dist.dir}/${jar.name}_incl-libs.jar"/>
<filter token="year" value="${year}"/>
<filter token="version" value="${version}"/>
<filter token="date" value="${TODAY}"/>
<filter token="log" value="true"/>
<filter token="verbose" value="true"/>
<!-- add everything needed to the classpath -->
<!-- adjust the settings to your local environment -->
<path id="classpath">
<fileset dir="${lib}" includes="*.jar, *.zip"/>
<fileset dir="${lib}/garuda" includes="*.jar, *.zip"/>
</path>
<path id="sourcepath">
<fileset dir="${src}"/>
<fileset dir="${test}"/>
<fileset dir="${resources}"/>
</path>
<!--For Garuda -->
<property name="garuda.gadget" value="${dist.dir}/${jar.name}_Garuda.zip"/>
</target>
<!-- =================================================================== -->
<!-- Creates a minimal SysBio JAR -->
<!-- =================================================================== -->
<target
name="minimal_sysbio"
depends="init"
description="Build a minimal version of SysBio for SBMLsimulator"
>
<!-- The relative path of the SysBio project -->
<property name="sysbio.dir" value="${basedir}/../SysBio"/>
<property name="sysbio.lib" value="${sysbio.dir}/lib"/>
<path id="sysbio.classpath">
<fileset dir="${sysbio.lib}"
includes="**.jar, **/*.jar, **.zip"
excludes="Java5/**, jsbml-old/**"
/>
<fileset dir="${basedir}/../jsbml/core/lib"
includes="**.jar"
/>
</path>
<path id="sysbio.sourcepath">
<fileset dir="${sysbio.dir}/src"/>
<fileset dir="${sysbio.dir}/test"/>
<fileset dir="${sysbio.dir}/resources"/>
<fileset dir="${sysbio.dir}/examples"/>
</path>
<echo message="Determining the revision number of SysBio"/>
<!--<exec executable="svn" outputproperty="svninfo.xml">
<arg line="info MINUSMINUSxml"/>
</exec>
<xmlproperty collapseAttributes="true">
<propertyresource name="svninfo.xml"/>
</xmlproperty>-->
<property name="sysbio.revision" value="1397"/> <!--${info.entry.revision}"/-->
<echo message="Deleting all previous versions of SysBio JAR files"/>
<delete verbose="true">
<fileset dir="${lib}">
<include name="SysBio**.jar"/>
</fileset>
</delete>
<echo message="Compile the entire SysBio project"/>
<delete dir="${sysbio.dir}/bin"/>
<mkdir dir="${sysbio.dir}/bin"/>
<javac
classpathref="sysbio.classpath"
compiler="${build.compiler}"
debug="${debug}"
deprecation="${deprecation}"
destdir="${sysbio.dir}/bin"
listfiles="yes"
memoryMaximumSize="512M"
nowarn="no"
optimize="${optimize}"
source="1.6"
srcdir="${sysbio.dir}/src"
sourcepathref="sysbio.sourcepath"
target="1.6"
verbose="${verbose}"
>
<!--
Force javac to link agains rt.jar! Works also in MAVEN with fork = true!
See http://stackoverflow.com/questions/4065401/using-internal-sun-classes-with-javac
-->
<compilerarg value="-XDignore.symbol.file"/>
</javac>
<!-- <copy todir="${sysbio.dir}/bin"/> -->
<echo message="Packing a minimal JAR file containing only parts required for SBMLsimulator"/>
<jar
compress="true"
filesetmanifest="mergewithoutmain"
index="true"
indexMetaInf="true"
jarfile="${lib}/sysbio.jar"
level="9"
manifestencoding="utf-8"
strict="warn"
update="true"
>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<section name="SysBio">
<attribute name="Specification-Title" value="SysBio"/>
<attribute name="Specification-Version" value="Revision ${sysbio.revision}"/>
<attribute name="Specification-Vendor" value="Institute for Biomedical Informatics (IBMI)"/>
<attribute name="Implementation-Title" value="SysBio"/>
<attribute name="Implementation-Version" value="Revision ${sysbio.revision} ${TODAY} (Build ${DSTAMP}-${TSTAMP})"/>
<attribute name="Implementation-Vendor" value="University of Tübingen"/>
</section>
</manifest>
<zipfileset dir="${sysbio.dir}" prefix="META-INF/">
<include name="licenses/COPYING.txt"/>
<include name="licenses/lib-licenses/*.txt"/>
<include name="licenses/lib-licenses/*.html"/>
<include name="licenses/AUTHORS.txt"/>
</zipfileset>
<fileset dir="${sysbio.dir}/bin" excludes="**/.svn*, **/package-info.class">
<include name="de/zbit/**.class"/>
<include name="de/zbit/collection/**.class"/>
<include name="de/zbit/garuda/**.class"/>
<include name="de/zbit/graph/**.class"/>
<include name="de/zbit/graph/gui/**.class"/>
<exclude name="de/zbit/graph/gui/Translator*.class"/>
<include name="de/zbit/graph/io/**.class"/>
<include name="de/zbit/graph/io/def/**.class"/>
<include name="de/zbit/graph/sbgn/**.class"/>
<include name="de/zbit/gui/**.class"/>
<include name="de/zbit/gui/csv/**.class"/>
<include name="de/zbit/gui/actioncommand/**.class"/>
<include name="de/zbit/gui/layout/**.class"/>
<exclude name="de/zbit/gui/layout/SpringUtilities.class"/>
<exclude name="de/zbit/gui/layout/VerticalLayout.class"/>
<include name="de/zbit/gui/panels/**.class"/>
<include name="de/zbit/gui/prefs/**.class"/>
<include name="de/zbit/gui/table/**.class"/>
<include name="de/zbit/gui/table/renderer/**.class"/>
<include name="de/zbit/gui/wizard/**.class"/>
<include name="de/zbit/gui/**.class"/>
<include name="de/zbit/io/**"/>
<include name="de/zbit/io/fileformat/**.class"/>
<include name="de/zbit/locales/**.class"/>
<include name="de/zbit/math/**.class"/>
<include name="de/zbit/resources/**.class"/>
<include name="de/zbit/sbml/**.class"/>
<include name="de/zbit/sbml/gui/**.class"/>
<include name="de/zbit/sbml/io/**.class"/>
<include name="de/zbit/sbml/layout/**.class"/>
<include name="de/zbit/sbml/layout/y/**.class"/>
<include name="de/zbit/sbml/util/**.class"/>
<include name="de/zbit/text/**.class"/>
<include name="de/zbit/util/**.class"/>
<include name="de/zbit/util/argparser/**.class"/>
<include name="de/zbit/util/logging/**.class"/>
<include name="de/zbit/util/objectwrapper/**.class"/>
<include name="de/zbit/util/prefs/**.class"/>
<include name="de/zbit/util/progressbar/**"/>
<include name="de/zbit/util/**.class"/>
</fileset>
<fileset dir="${sysbio.dir}/resources" excludes="**/.svn*, package-info.*">
<include name="de/zbit/garuda/img/**.png"/>
<include name="de/zbit/garuda/locales/**.xml"/>
<include name="de/zbit/graph/locales/**.xml"/>
<include name="de/zbit/gui/img/**.png"/>
<include name="de/zbit/io/**.txt"/>
<include name="de/zbit/locales/**.xml"/>
<include name="de/zbit/sbml/locales/**.xml"/>
</fileset>
<zipfileset excludes="META-INF/*" src="${sysbio.dir}/lib/sysbio-osx-support.jar"/>
<zipfileset excludes="META-INF/*" src="${sysbio.dir}/lib/argparser.jar"/>
<zipfileset excludes="META-INF/*" src="${sysbio.dir}/lib/graph/y.jar"/>
</jar>
</target>
<!-- =================================================================== -->
<!-- Build a minimal version of JSBML for SBMLsimulator -->
<!-- =================================================================== -->
<target
name="minimal_jsbml"
depends="init"
description="Build a minimal version of JSBML for SBMLsimulator"
>
<echo message="Defining basic properties of the JSBML project"/>
<property name="jsbml.dir" value="${basedir}/../JSBML"/>
<property name="jsbml.name" value="JSBML"/>
<property name="jsbml.version" value="1.5a"/>
<property name="jar.excludes" value="META-INF/**, **/package-info.class, **/package.html, **/*.java"/>
<property name="jar.includes" value="**.txt, **/*.txt, **.xml, **/*.xml, **.properties, **/*.properties, **.cfg, **/*.cfg, **.obo, **/*.obo, **/*.json, **/*.py"/>
<echo message="Determining the revision number of JSBML"/>
<property name="jsbml.revision" value="2288"/>
<echo message="Compiling the entire JSBML project for revision ${jsbml.revision}"/>
<delete dir="${jsbml.dir}/bin"/>
<mkdir dir="${jsbml.dir}/bin"/>
<path id="jsbml.classpath">
<fileset dir="${jsbml.dir}/core/lib" includes="**.jar, **/*.jar, **.zip"/>
<fileset dir="${jsbml.dir}/modules/tidy/lib" includes="**.jar, **/*.jar, **.zip"/>
</path>
<!-- Compile JSBML including core and all extension packages -->
<javac
classpathref="jsbml.classpath"
compiler="${build.compiler}"
debug="${debug}"
deprecation="${deprecation}"
destdir="${jsbml.dir}/bin"
fork="true"
includeantruntime="false"
listfiles="yes"
memoryMaximumSize="512M"
nowarn="no"
optimize="${optimize}"
source="1.8"
target="1.8"
verbose="${verbose}"
>
<!-- Source -->
<src path="${jsbml.dir}/core/src"/>
<src path="${jsbml.dir}/extensions/arrays/src"/>
<src path="${jsbml.dir}/extensions/comp/src"/>
<src path="${jsbml.dir}/extensions/distrib/src"/>
<src path="${jsbml.dir}/extensions/dyn/src"/>
<src path="${jsbml.dir}/extensions/fbc/src"/>
<src path="${jsbml.dir}/extensions/groups/src"/>
<src path="${jsbml.dir}/extensions/layout/src"/>
<src path="${jsbml.dir}/extensions/multi/src"/>
<src path="${jsbml.dir}/extensions/qual/src"/>
<src path="${jsbml.dir}/extensions/render/src"/>
<src path="${jsbml.dir}/extensions/req/src"/>
<src path="${jsbml.dir}/extensions/spatial/src"/>
<!-- Resources -->
<src path="${jsbml.dir}/core/resources"/>
<src path="${jsbml.dir}/extensions/arrays/resources"/>
<src path="${jsbml.dir}/extensions/comp/resources"/>
<src path="${jsbml.dir}/extensions/distrib/resources"/>
<src path="${jsbml.dir}/extensions/dyn/resources"/>
<src path="${jsbml.dir}/extensions/fbc/resources"/>
<src path="${jsbml.dir}/extensions/groups/resources"/>
<src path="${jsbml.dir}/extensions/layout/resources"/>
<src path="${jsbml.dir}/extensions/multi/resources"/>
<src path="${jsbml.dir}/extensions/qual/resources"/>
<src path="${jsbml.dir}/extensions/render/resources"/>
<src path="${jsbml.dir}/extensions/req/resources"/>
<src path="${jsbml.dir}/extensions/spatial/resources"/>
<!-- Modules -->
<src path="${jsbml.dir}/modules/tidy/src"/>
</javac>
<echo message="Packing a minimal JAR file containing only parts required for SBMLsimulator"/>
<property name="vendor" value="The JSBML Team"/>
<jar
compress="true"
filesetmanifest="mergewithoutmain"
index="true"
indexMetaInf="true"
jarfile="${lib}/jsbml-${jsbml.version}-incl-libs.jar"
level="9"
manifestencoding="utf-8"
strict="warn"
update="true"
>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Built-Date" value="${TODAY}"/>
<attribute name="Bundle-Name" value="${jsbml.name}"/>
<attribute name="Bundle-Version" value="${version}"/>
<attribute name="Bundle-Vendor" value="${vendor}"/>
<attribute name="Bundle-RequiredExecutionEnvironment" value="JavaSE-1.8"/>
<attribute name="Created-By" value="${vendor}"/>
<section name="${jsbml.name}">
<attribute name="Specification-Title" value="${jsbml.name}"/>
<attribute name="Specification-Version" value="${jsbml.version}"/>
<attribute name="Specification-Vendor" value="${vendor}"/>
<attribute name="Implementation-Title" value="${jsbml.name}"/>
<attribute name="Implementation-Version" value="Revision ${jsbml.revision} (Build ${DSTAMP}-${TSTAMP})"/>
<attribute name="Implementation-Vendor" value="${vendor}"/>
<attribute name="Implementation-URL" value="http://sbml.org/Software/JSBML/"/>
</section>
</manifest>
<fileset
dir="${jsbml.dir}/bin"
includes="META-INF/**"
/>
<!-- Licenses -->
<!--<fileset dir="${jsbml.dir}/core">
<include name="licenses/COPYING.txt"/>
<include name="licenses/COPYING.html"/>
<include name="licenses/lib-licenses/*.txt"/>
<include name="licenses/lib-licenses/*.html"/>
<include name="licenses/JSBML-AUTHORS.txt"/>
</fileset>-->
<!-- Binaries -->
<fileset
dir="${jsbml.dir}/bin"
includes="**.class **/*.class"
excludes="**/.svn*, **/package-info.class"
/>
<!-- Resources -->
<fileset dir="${jsbml.dir}/core/resources" includes="${jar.includes}"/>
<fileset dir="${jsbml.dir}/extensions/arrays/resources" includes="${jar.includes}"/>
<fileset dir="${jsbml.dir}/extensions/comp/resources" includes="${jar.includes}"/>
<fileset dir="${jsbml.dir}/extensions/dyn/resources" includes="${jar.includes}"/>
<fileset dir="${jsbml.dir}/extensions/fbc/resources" includes="${jar.includes}"/>
<fileset dir="${jsbml.dir}/extensions/groups/resources" includes="${jar.includes}"/>
<fileset dir="${jsbml.dir}/extensions/layout/resources" includes="${jar.includes}"/>
<fileset dir="${jsbml.dir}/extensions/multi/resources" includes="${jar.includes}"/>
<fileset dir="${jsbml.dir}/extensions/qual/resources" includes="${jar.includes}"/>
<fileset dir="${jsbml.dir}/extensions/render/resources" includes="${jar.includes}"/>
<fileset dir="${jsbml.dir}/extensions/req/resources" includes="${jar.includes}"/>
<fileset dir="${jsbml.dir}/extensions/spatial/resources" includes="${jar.includes}"/>
<!-- 3rd party libraries -->
<zipfileset excludes="${jar.excludes}, readme.txt, LICENSE" src="${jsbml.dir}/core/lib/biojava-ontology-4.0.0.jar"/>
<zipfileset excludes="${jar.excludes}" src="${jsbml.dir}/core/lib/jigsaw-dateParser.jar"/>
<zipfileset excludes="${jar.excludes}" src="${jsbml.dir}/core/lib/json-simple-1.1.1.jar"/>
<zipfileset excludes="${jar.excludes}" src="${jsbml.dir}/core/lib/log4j-1.2-api-2.3.jar"/>
<zipfileset excludes="${jar.excludes}" src="${jsbml.dir}/core/lib/log4j-api-2.3.jar"/>
<zipfileset excludes="${jar.excludes}" src="${jsbml.dir}/core/lib/log4j-core-2.3.jar"/>
<zipfileset excludes="${jar.excludes}" src="${jsbml.dir}/core/lib/log4j-slf4j-impl-2.3.jar"/>
<zipfileset excludes="${jar.excludes}" src="${jsbml.dir}/core/lib/slf4j-api-1.7.21.jar"/>
<zipfileset excludes="${jar.excludes}" src="${jsbml.dir}/core/lib/spi-full-0.2.4.jar"/>
<zipfileset excludes="${jar.excludes}" src="${jsbml.dir}/core/lib/stax2-api-3.1.4.jar"/>
<zipfileset excludes="${jar.excludes}" src="${jsbml.dir}/core/lib/staxmate-2.3.0.jar"/>
<zipfileset excludes="${jar.excludes}" src="${jsbml.dir}/core/lib/woodstox-core-5.0.1.jar"/>
<zipfileset excludes="${jar.excludes}" src="${jsbml.dir}/core/lib/xpp3_min-1.1.4c.jar"/>
<zipfileset excludes="${jar.excludes}" src="${jsbml.dir}/core/lib/xstream-1.4.9.jar"/>
<zipfileset excludes="${jar.excludes}" src="${jsbml.dir}/modules/tidy/lib/jtidy-r938.jar"/>
</jar>
<!-- Remove temporary file again: -->
<delete file="${jsbml.dir}/core/licenses/JSBML-AUTHORS.txt"/>
</target>
</project>