-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
621 lines (532 loc) · 26.1 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
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="TEALsim" default="compile" basedir=".">
<description>Builds, tests, and runs the project TEALsim.</description>
<!--/========================================================================/
BASIC PROPERTIES SECTION
Set any relevant settings for the build script in this section
/=========================================================================/-->
<target name="-init-teal-settings">
<property name="project.title" value="TEALsim" />
<property name="version" value="v0.7" />
<property name="JavaMinVersion" value="1.6+" />
<property name="jar.keystore.file" location="${basedir}/resources/TEALKey" />
<property name="jar.alias" value="tealkey" />
<property name="jar.storepass" value="galileo" />
<property name="jar.dir" value="${build.dir}/jars" />
<property name="lib.dir" value="${basedir}/lib" />
<!-- this path will be used as codebase for the generated JNLP's to run on a public webserver -->
<property name="publish.web.url" value="http://web.mit.edu/viz/EM/simulations" />
<!-- this path will be used as codebase for the generated JNLP's to run locally -->
<property name="publish.local.url" value="./../jars" />
<!--
If you prefer clients to load the operating system native graphics libraries
from your own webserver, change the corresponding extension properties to
match your server DNS. This will cause the corresponding JNLP files to link
to your webserver instead of the official providers website -->
<property name="j3d-Extension" value="http://download.java.net/media/java3d/webstart/release/java3d-1.5-latest-joal.jnlp" />
<property name="lwjgl-Extension" value="http://lwjgl.org/jnlp/extension.php" />
<property name="jogl-Extension" value="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp" />
<!--
<property name="j3d-Extension" value="${publish.web.url}/j3d/j3d.jnlp" />
<property name="lwjgl-Extension" value="${publish.web.url}/lwjgl/lwjgl.jnlp" />
<property name="jogl-Extension" value="${publish.web.url}/jogl/jogl.jnlp" />
-->
<property name="GFXExtension" value="lib/gfx.jnlp" description="In which subfolder of the TEALsim distribution are the runtime libraries"/>
</target>
<!--/========================================================================/
FILESET SECTION
Set the files to be included/excluded for particular packages
/=========================================================================/-->
<target name="-init-filesets" depends="init">
<fileset id="license" dir="${basedir}" excludes="${excludes}">
<include name="LICENSE.txt" />
<include name="README.txt" />
<include name="NOTICE.txt" />
</fileset>
<fileset id="resource.files" dir="resources" excludes="${excludes}">
<include name="help/**/*.*" />
<include name="models/**/*.*" />
<include name="icons/**/*.*" />
</fileset>
<fileset id="core.image.files" dir="resources" excludes="${excludes}">
<include name="icons/**/*.png" />
</fileset>
<fileset id="ilab.files" dir="${build.classes.dir}" excludes="${excludes}">
<include name="tealsim/physics/em/TeachSpinBase*.*" />
<include name="tealsim/physics/ilab/*.*" />
</fileset>
<fileset id="isocket.files" dir="${build.classes.dir}" excludes="${excludes}">
<include name="isocket/**" />
<exclude name="isocket/Test*.class" />
</fileset>
<fileset id="core.files" dir="${build.classes.dir}" excludes="${excludes}">
<include name="teal/**" />
<exclude name="teal/physics/*Particle*.class" />
<exclude name="teal/physics/em/Circuit.class" />
<exclude name="teal/physics/em/*Particle*.class" />
<exclude name="teal/plot/CircuitPotentialPlot.class" />
<exclude name="teal/visualization/processing/ColorCoding.class" />
<exclude name="teal/visualization/processing/Quantize.class" />
<exclude name="**/*.png" />
</fileset>
<fileset id="sim.files" dir="${build.classes.dir}" excludes="${excludes}">
<include name="tealsim/util/**" />
<include name="tealsim/TealSimApp*.*" />
<include name="tealsim/Java3DSImport*.*" />
<include name="tealsim/physics/em/**" />
<include name="tealsim/physics/mech/**" />
<include name="tealsim/physics/examples/**" />
<exclude name="tealsim/physics/em/Capacitor2.class" />
<exclude name="tealsim/physics/ilab/**" />
</fileset>
<fileset id="jnlp_em" dir="${basedir}/jnlp">
<include name="boxinduction.jnlp" />
<include name="capacitor.jnlp" />
<include name="chargebyinduction.jnlp" />
<include name="chargedmetalslab.jnlp" />
<include name="chargeinmagneticfield.jnlp" />
<include name="coulombslaw.jnlp" />
<include name="esforce.jnlp" />
<include name="emradiator.jnlp" />
<include name="videogame.jnlp" />
<include name="zoo.jnlp" />
<include name="exbdrift.jnlp" />
<include name="fallingcoil.jnlp" />
<include name="fallingmagnet.jnlp" />
<include name="faradayslaw.jnlp" />
<include name="faradayslawrotation.jnlp" />
<include name="floatingcoil.jnlp" />
<include name="mappingfields.jnlp" />
<include name="pcharges.jnlp" />
<include name="pentagon.jnlp" />
<include name="radiationcharge.jnlp" />
<include name="teachspin.jnlp" />
<include name="tealsimapp.jnlp" />
<include name="torqueondipb.jnlp" />
<include name="torqueondipe.jnlp" />
<include name="vandegraff.jnlp" />
<include name="wireandmagnet.jnlp" />
<include name="exploringpotential.jnlp" />
</fileset>
<fileset dir="${basedir}/jnlp" id="jnlp_examples">
<include name="*.jnlp" />
</fileset>
<fileset dir="${basedir}/jnlp" id="jnlp_mech">
<include name="celestial.jnlp" />
<include name="circularmotion.jnlp" />
<include name="galileosinclinedplane.jnlp" />
<include name="inclinedplane.jnlp" />
<include name="newtonscradle.jnlp" />
<include name="pendulum.jnlp" />
<include name="planets.jnlp" />
<include name="projectile.jnlp" />
<include name="rigidbar.jnlp" />
<include name="simplependulum.jnlp" />
<include name="simplependulumimpulse.jnlp" />
<include name="weightedpendulum.jnlp" />
</fileset>
<fileset dir="${basedir}/jnlp" id="jnlp_misc">
<include name="planetwaveapp.jnlp" />
<include name="seafloor.jnlp" />
</fileset>
<fileset dir="${basedir}/jnlp" id="jnlp_ilab">
<include name="ForceOnDipoleLV.jnlp" />
</fileset>
</target>
<!--/========================================================================/
MAIN TARGETS SECTION
Defines all targets which may be called by on their own
/=========================================================================/-->
<target name="help" description="Gives a quick overview across the most important build targets">
<echo>Among others the following interesting Ant targets are available:</echo>
<echo>(for the rest of the targets check out the 'build.xml' and 'nbproject/build-impl.xml' files)</echo>
<echo></echo>
<echo>ant [compile] - the default (build) target which will build the project; 'compile' can be ommited</echo>
<echo>ant clean - cleans the build folder but doesn't touch any of the released packages</echo>
<echo>ant jar - creates the projects various jar packages along with the corresponding JNLP files</echo>
<echo>ant dist - creates a release package based on the current source code</echo>
</target>
<!-- overwrite the Netbeans clean target to delete the build classes directory only -->
<target name="-do-clean" description="Cleans up the build folder but NOT the released versions (folder)">
<delete dir="${build.dir}" />
</target>
<!-- overwrite the Netbeans jar target to jar various packages -->
<target name="jar" depends="-init-filesets,compile,-pre-jar,-jar-all,-jar-core,-jar-ilab,-jar-sims,-post-jar,-init-libs,-init-jnlp" description="Build JAR." />
<target name="-jar-core" depends="compile">
<tealsim-jar destfile="TEALsim-core.jar" section="teal">
<content>
<fileset refid="license" />
<fileset refid="core.files" />
<fileset refid="core.image.files" />
</content>
<mf-parameters>
<attribute name="Class-Path" value="lib/"/>
</mf-parameters>
</tealsim-jar>
</target>
<target name="-jar-sims" depends="compile">
<tealsim-jar destfile="TEALsim-simulations.jar" section="tealsim">
<content>
<fileset refid="license" />
<fileset refid="sim.files" />
<fileset refid="resource.files" />
</content>
<mf-parameters>
<attribute name="Class-Path" value="lib/"/>
</mf-parameters>
</tealsim-jar>
</target>
<target name="-jar-all" depends="compile" description="Creates a single jar file containing all of the projects files">
<tealsim-jar destfile="TEALsim-all.jar" section="teal">
<content>
<fileset refid="license" />
<fileset refid="core.files" />
<fileset refid="sim.files" />
<fileset refid="isocket.files" />
<fileset refid="ilab.files" />
<fileset refid="resource.files" />
</content>
<mf-parameters>
<attribute name="Class-Path" value="lib/"/>
</mf-parameters>
</tealsim-jar>
</target>
<target name="-jar-ilab" depends="compile">
<tealsim-jar destfile="TEALsim-ilab.jar" section="teal">
<content>
<fileset refid="license" />
<fileset refid="core.files" />
<!--<fileset refid="images_core" />
<fileset dir="${build.dir}/classes">
<include name="isocket/*.*" />
<include name="tealsim/physics/em/TeachSpinBa*.*" />
<include name="tealsim/physics/ilab/TeachS*.*" />
<include name="tealsim/physics/ilab/Force*.*" />
</fileset>
<fileset dir="resources">
<exclude name="CVS/*.*" />
<include name="help/ForceOnDipoleLabVIEW.*" />
<include name="models/1_Coil_1.3DS" />
<include name="models/COILMAP3.JPG" />
</fileset>-->
<fileset refid="ilab.files" />
<fileset refid="resource.files" />
</content>
<!-- <mf-parameters>
<attribute name="Main-Class" value="teal.app.ForceOnDipoleLVApp" />
</mf-parameters>-->
</tealsim-jar>
</target>
<target name="distribution" depends="jar,javadoc" description="Builds the whole project and creates all release packages and archives">
<echo>TARGET NOT PROPERLY TESTED YET!</echo>
<!--
<echo>Zipping the RELEASE distribution:</echo>
<zip destfile="${release.dir}/${project}-RELEASE-${version}-${build.version}.zip">
<zipfileset refid="license" prefix="${project}-${version}" />
<zipfileset dir="${build.dir}/jars" prefix="${project}-${version}/jars">
<include name="**" />
<exclude name="TEALsim-all.jar" />
</zipfileset>
<zipfileset dir="${build.dir}/jnlp" prefix="${project}-${version}/jnlp" />
</zip>
<echo>Zipping the SDK distribution:</echo>
<zip destfile="${release.dir}/${project}-SDK-${version}-${build.version}.zip">
<zipfileset refid="license" prefix="${project}-${version}" />
<zipfileset dir="${basedir}" includes="build*.xml" prefix="${project}-${version}" />
<zipfileset dir="${lib.dir}" includes="jreleaseinfo-1.3.0.jar" prefix="${project}-${version}/lib" />
<zipfileset refid="libs.fileset" prefix="${project}-${version}/lib" />
<zipfileset refid="core.files" prefix="${project}-${version}/src" />
<zipfileset refid="sim.files" prefix="${project}-${version}/src" />
<zipfileset refid="jnlp_examples" prefix="${project}-${version}/resources/jnlp" />
<zipfileset refid="resource.files" prefix="${project}-${version}/resources" />
-->
<!-- <exclude name="isocket" />
<exclude name="tealsim/physics/ilab" />
<include name="**/*.*" />-->
<!-- </zip>
<echo>Jaring the BINARIES-ONLY distribution:</echo>
<echo>Zipping the SOURCE-ONLY distribution:</echo>
<zip destfile="${release.dir}/${project}-SOURCE-ONLY-${version}-${build.version}.zip">
<zipfileset refid="fileset.src.core.files" prefix="${project}-${version}/src" />
<zipfileset refid="fileset.src.sim.files" prefix="${project}-${version}/src" />
<zipfileset refid="fileset.src.isocket.files" prefix="${project}-${version}/src" />
<zipfileset refid="fileset.src.ilab.files" prefix="${project}-${version}/src" />
</zip>-->
</target>
<target name="javadoc">
<echo>TARGET NOT PROPERLY TESTED YET!</echo>
<!--
<echo>Generating the Javadoc documentation:</echo>
<mkdir dir="${javadoc.dir}" />
<javadoc destdir="${javadoc.dir}" classpathref="libs.classpath" private="false" protected="true" version="false" author="true" includenosourcepackages="true" use="false" stylesheetfile="${basedir}/doc/javadoc.css" splitindex="true" windowtitle="${project.fullname} ${version} API" doctitle="${project.fullname} ${version}" bottom="Copyright (c) ${year} MIT TEAL/Studio Physics Project. All Rights Reserved.">
<packageset dir="${src.dir}" defaultexcludes="yes">
<exclude name="isocket" />
<exclude name="tealsim/physics/ilab" />
</packageset>
<group title="TEAL API" packages="teal.*" />
<group title="TEAL Simulations" packages="tealsim.*" />
</javadoc>
<echo>Zipping the JAVADOC distribution:</echo>
<zip destfile="${release.dir}/${project}-JAVADOC-${version}-${build.version}.zip">
<zipfileset dir="${javadoc.dir}" prefix="${project}-${version}/javadoc" />
</zip>-->
</target>
<!-- generate the documentation -->
<target name="javadocall">
<echo>TARGET NOT PROPERLY TESTED YET!</echo>
<!--
<mkdir dir="${javadoc.dir}" />
<javadoc destdir="${javadoc.dir}" classpathref="libs.classpath" private="false" protected="true" version="false" author="true" includenosourcepackages="true" use="false" stylesheetfile="${basedir}/doc/javadoc.css" splitindex="true" windowtitle="${project.fullname} ${version} API" doctitle="${project.fullname} ${version}" bottom="Copyright (c) ${year} MIT TEAL/Studio Physics Project. All Rights Reserved.">
<fileset dir="${src.dir}">
<include name="teal/**/*.java" />
<include name="teal**/*.html" />
</fileset>
</javadoc>-->
</target>
<target name="-init-jnlp" description="Copies the JNLP web start files to the build folder matching this build script's settings">
<pathconvert property="web.start.libraries" pathsep="${line.separator}">
<path path="${javac.classpath}"/>
<mapper>
<chainedmapper>
<flattenmapper/>
<globmapper from="*.jar" to="<jar href="lib/*.jar" download="lazy"/>"/>
</chainedmapper>
</mapper>
</pathconvert>
<!--<echo message="${web.start.libraries}"/>-->
<filter token="Libraries" value="${web.start.libraries}" />
<filter token="JavaMinVersion" value="${JavaMinVersion}" />
<filter token="GFXExtension" value="${GFXExtension}" />
<!-- Create one directory with JNLP's for local use -->
<mkdir dir="${build.dir}/jnlp_local" />
<filter token="WebURL" value="${publish.local.url}" />
<copy todir="${build.dir}/jnlp_local" filtering="on">
<fileset refid="jnlp_em" />
<fileset refid="jnlp_examples" />
<fileset refid="jnlp_misc" />
</copy>
<!-- Create another directory with JNLP's for web use -->
<mkdir dir="${build.dir}/jnlp_web" />
<filter token="WebURL" value="${publish.web.url}" />
<copy todir="${build.dir}/jnlp_web" filtering="on">
<fileset refid="jnlp_em" />
<fileset refid="jnlp_examples" />
<fileset refid="jnlp_misc" />
</copy>
</target>
<target name="-init-libs" depends="sign-jars" description="Copies all required runtime library files to the build folder">
<!--
Copy the gfx.jnlp to the lib folder, which will be used by the TEALsim to
load the proper native graphics libraries
-->
<mkdir dir="${jar.dir}/lib" />
<filter token="WebURL" value="codebase="${publish.web.url}"" />
<filter token="J3D" value="${j3d-Extension}" />
<filter token="LWJGL" value="${lwjgl-Extension}" />
<filter token="JOGL" value="${jogl-Extension}" />
<copy todir="${jar.dir}/lib" filtering="on">
<fileset dir="${lib.dir}" includes="gfx.jnlp" />
</copy>
<!--
Copy the snapshots of all native libraries to the jars folder, which can
be used instead of the currently online available libraries fetched from
the official vendor websites
-->
<filter token="WebURL" value="${publish.web.url}" />
<copy todir="${jar.dir}/lib/j3d" filtering="on"> <!-- filtering ON! -->
<fileset dir="${lib.dir}/j3d/j3d-snapshot" includes="**/*.jnlp" />
</copy>
<copy todir="${jar.dir}/lib/j3d" filtering="off"> <!-- filtering OFF! -->
<fileset dir="${lib.dir}/j3d/j3d-snapshot" includes="**/*" excludes="**/*.jnlp" />
</copy>
<copy todir="${jar.dir}/lib/lwjgl" filtering="on">
<fileset dir="${lib.dir}/jme/lwjgl-snapshot" includes="**/*.jnlp" />
</copy>
<copy todir="${jar.dir}/lib/lwjgl" filtering="off">
<fileset dir="${lib.dir}/jme/lwjgl-snapshot" includes="**/*" excludes="**/*.jnlp" />
</copy>
<copy todir="${jar.dir}/lib/jogl" filtering="on">
<fileset dir="${lib.dir}/mtgame/jogl-snapshot" includes="**/*.jnlp" />
</copy>
<copy todir="${jar.dir}/lib/jogl" filtering="off">
<fileset dir="${lib.dir}/mtgame/jogl-snapshot" includes="**/*" excludes="**/*.jnlp" />
</copy>
<!--
Also copy the required Java runtime libraries to the lib folder
-->
<!-- convert the build scripts classpath to point to the selfsigned libraries -->
<pathconvert property="selfsigned.libraries" pathsep=";">
<path id="signed.path.test" path="${javac.classpath}"/>
<mapper>
<chainedmapper>
<flattenmapper/>
<globmapper from="*.jar" to="lib/!selfsigned/*.jar"/>
</chainedmapper>
</mapper>
</pathconvert>
<!--<echo message="${selfsigned.libraries}"/>-->
<!-- copy the self signed libraries to the jar folder -->
<copy todir="${jar.dir}/lib" flatten="true" filtering="off">
<path path="${selfsigned.libraries}"/>
</copy>
</target>
<target name="sign-jars" depends="init" description="Signs all libraries on the classpath and puts them in a temporary folder">
<!-- we use the libraries set via Netbeans -->
<path id="nb.classpath" path="${javac.classpath}"/>
<!--<property name="myproperty" refid="nb.classpath"/>
<echo message="${myproperty}"/>-->
<!-- we convert our libraries path to a fileset, since jarsigner seems to have
an issue if you pass in a path -->
<pathtofileset name="nb.classpath.as.fileset" pathrefid="nb.classpath" dir="/"/>
<!-- self sign all of the libraries specified on the classpath and store them
in a separate folder; they will be used by the webstart files, otherwise
the application wouldn't boot -->
<mkdir dir="${basedir}/lib/!selfsigned" />
<signjar destdir="${basedir}/lib/!selfsigned" verbose="false" keystore="${jar.keystore.file}" alias="${jar.alias}" storepass="${jar.storepass}">
<fileset refid="nb.classpath.as.fileset"/>
<flattenmapper />
</signjar>
</target>
<target name="-post-init" depends="-init-teal-settings">
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${lib.dir}/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<macrodef name="tealsim-jar">
<attribute name="section" />
<attribute name="destfile" />
<attribute name="destdir" default="${jar.dir}"/>
<attribute name="sign" default="true" />
<element name="content" optional="true" />
<element name="parameters" optional="true" />
<element name="mf-parameters" optional="true" />
<sequential>
<echo>Might have to JAR a new @{destfile} ...</echo>
<outofdate>
<sourcefiles>
<content />
</sourcefiles>
<targetfiles path="@{destdir}/@{destfile}"/>
<sequential>
<echo> ... now JARing new @{destfile}!</echo>
<mkdir dir="@{destdir}" />
<jar destfile="@{destdir}/@{destfile}" duplicate="preserve">
<content />
<parameters />
<manifest>
<attribute name="Built-by" value="${user.name}">
</attribute>
<attribute name="Built-on" value="${build.time}">
</attribute>
<section name="@{section}">
<attribute name="Specification-Title" value="${project.fullname}">
</attribute>
<attribute name="Specification-Version" value="${version}">
</attribute>
<attribute name="Specification-Vendor" value="MIT TEAL/Studio Physics Project">
</attribute>
<attribute name="Implementation-Title" value="${project.fullname}">
</attribute>
<attribute name="Implementation-Version" value="${version}">
</attribute>
<attribute name="Implementation-Vendor" value="MIT TEAL/Studio Physics Project">
</attribute>
</section>
<mf-parameters />
</manifest>
</jar>
<signjar keystore="${jar.keystore.file}" alias="${jar.alias}" storepass="${jar.storepass}">
<fileset dir="@{destdir}" includes="@{destfile}" />
</signjar>
</sequential>
</outofdate>
</sequential>
</macrodef>
<!-- Debugging macro to show the contents of a fileset -->
<macrodef name="echo-fileset">
<attribute name="filesetref" />
<sequential>
<pathconvert pathsep=" " property=" ">
<path>
<fileset refid="@{filesetref}" />
</path>
</pathconvert>
<echo>${@{filesetref}.echopath}</echo>
</sequential>
</macrodef>
</target>
<!-- this takes the .class files of tealsim and packs it into a jar file -->
<target name="pack_tealsim">
<echo>TARGET NOT PROPERLY TESTED YET!</echo>
<!--
<mkdir dir="${module.libdir}"/>
<jar jarfile="${module.libdir}/${module.client.jar}">
<fileset dir="${tealsim.classes.dir}">
<include name="**/*.class"/>
<include name="**/*.png"/>
<exclude name="org/**/*.class"/>
<exclude name="tests/**/*.class"/>
<exclude name="teal/render/j3d/**/*.class"/>
<include name="teal.render.j3d/HasPickCanvas.java"/>
</fileset>
</jar>-->
</target>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="TEALsim-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>