forked from AbFab3D/AbFab3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
executable file
·725 lines (641 loc) · 29 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
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
<?xml version="1.0" standalone="yes"?>
<project basedir="." default="build" name="AbFab3D">
<import file="build_common.xml" />
<description></description>
<property name="version" value="1.0.0" />
<property name="src.dir" value="${basedir}/src"/>
<property name="apps.dir" value="${basedir}/apps"/>
<property name="release.dir" value="${basedir}/release"/>
<property name="test.dir" value="${basedir}/test/junit"/>
<property name="japex.dir" value="${basedir}/test/japex"/>
<property name="classes.dir" value="${basedir}/classes" />
<property name="test.classes.dir" value="${classes.dir}/test" />
<property name="japex.classes.dir" value="${classes.dir}/japex" />
<property name="jar.dir" value="${basedir}/jars" />
<property name="lib.dir" value="${basedir}/lib"/>
<property name="manifest.dir" value="${basedir}/manifest"/>
<property name="javadocs.dir" value="${basedir}/docs/javadoc"/>
<property name="refguide.dir" value="${basedir}/docs/refguide"/>
<property name="xj3d.dir" value="..\..\..\xj3d\code\trunk" />
<property name="av3d.dir" value="..\..\..\j3d.org\aviatrix3d-2\aviatrix3d" />
<property name="entrypoint" value="abfab3d.Creator" />
<property name="runarg0" value="-Xmx7000M"/>
<!-- <property name="runarg0" value="-Xmx1200M -Xprof"/> -->
<!--
<property name="runarg1" value="-Dsun.java2d.noddraw=true"/>
<property name="runarg2" value="-Djava.library.path="./natives/${os.name}/${os.arch}"" />
-->
<property name="jvmrunargs" value="${runarg0}"/>
<!-- Emma code coverage properties -->
<property name="emma.dir" value="${basedir}/lib/support/emma" />
<property name="emma.out.dir" value="${basedir}/emma" />
<property name="emma.coverage.dir" location="${emma.out.dir}/coverage" />
<property name="emma.instr.dir" location="${emma.out.dir}/instrumented" />
<property name="env.JAPEX_HOME" value="lib/support/japex" />
<path id="run.classpath" >
<pathelement location="${classes.dir}" />
</path>
<!-- path element used by EMMA taskdef below: -->
<path id="emma.lib" >
<pathelement location="${emma.dir}/emma.jar" />
<pathelement location="${emma.dir}/emma_ant.jar" />
</path>
<!-- this loads <emma> and <emmajava> custom tasks: -->
<taskdef resource="emma_ant.properties" classpathref="emma.lib" />
<!-- End Emma code coverage properties -->
<!-- Cobertura code coverage properties -->
<property name="cobertura.dir" value="${basedir}/lib/support/cobertura" />
<property name="cobertura.out.dir" value="${basedir}/cobertura" />
<property name="cobertura.reports.dir" value="${cobertura.out.dir}/reports" />
<property name="cobertura.reports.xml.dir" value="${cobertura.reports.dir}/junit-xml" />
<property name="cobertura.reports.html.dir" value="${cobertura.reports.dir}/junit-html" />
<property name="cobertura.instrumented.dir" value="${cobertura.out.dir}/instrumented" />
<property name="cobertura.coverage.xml.dir" value="${cobertura.out.dir}/coverage/xml" />
<property name="cobertura.coverage.summaryxml.dir" value="${cobertura.out.dir}/coverage/summaryxml" />
<property name="cobertura.coverage.html.dir" value="${cobertura.out.dir}/coverage/html" />
<path id="cobertura.classpath">
<fileset dir="${cobertura.dir}">
<include name="cobertura.jar" />
<include name="lib/**/*.jar" />
</fileset>
</path>
<taskdef classpathref="cobertura.classpath" resource="tasks.properties"/>
<!-- End Cobertura code coverage properties -->
<target name="build"
description="Complete clean, setup, compilation, run"
depends="clean,init,compile,compileApps,jar" />
<!-- Create destination directories -->
<target name="init" description="Create destination directories">
<mkdir dir="${classes.dir}"/>
<mkdir dir="${javadocs.dir}"/>
<mkdir dir="${test.classes.dir}" />
</target>
<target name="compile" depends="init" description="Compile all Java source files">
<compilejava package="abfab3d/util"
jars="xj3d-core_2.0.0.jar vecmath.jar xj3d.cadfilter_2.0.0.jar j3d-org-all_2.0.0.jar"
/>
<compilejava package="abfab3d/transforms"
jars="jafama.jar vecmath.jar"
/>
<compilejava package="abfab3d/intersect"
jars=""
/>
<compilejava package="abfab3d/path"
jars=""
/>
<compilejava package="abfab3d/grid"
jars=""
/>
<compilejava package="abfab3d/datasources"
jars="jafama.jar vecmath.jar"
/>
<compilejava package="abfab3d/grid/util"
jars=""
/>
<compilejava package="abfab3d/grid/op"
jars="jafama.jar xj3d-core_2.0.0.jar xj3d-common_2.0.0.jar j3d-org-all_2.0.0.jar vecmath.jar"
/>
<compilejava package="abfab3d/grid/query"
jars=""
/>
<compilejava package="abfab3d/geom"
jars=""
/>
<compilejava package="abfab3d/mesh"
jars=""
/>
<compilejava package="abfab3d/io/input"
jars="vecmath.jar vlc.jar uri.jar xj3d-core_2.0.0.jar xj3d.cadfilter_2.0.0.jar j3d-org-all_2.0.0.jar commons-io-2.4.jar"
/>
<compilejava package="abfab3d/io/output"
jars="vecmath.jar toxiclibscore.jar volumeutils.jar vlc.jar uri.jar xj3d-core_2.0.0.jar xj3d.cadfilter_2.0.0.jar"
/>
<compilejava package="abfab3d/io/soap"
jars=""
/>
<compilejava package="abfab3d/io/soap/transport"
jars="" />
<compilejava package="abfab3d/io/soap/encoders"
jars="" />
<compilejava package="abfab3d/io/soap/envelope"
jars="" />
<compilejava package="shapeways/api"
jars="" />
<compilejava package="shapeways/api/models"
jars="" />
<compilejava package="shapeways/api/models/reservation"
jars="" />
<compilejava package="shapeways/api/price"
jars="" />
<compilejava package="abfab3d/io/shapeways"
jars="vecmath.jar xj3d-core_2.0.0.jar j3d-org-all_2.0.0.jar"
/>
<compilejava package="abfab3d/validate"
jars=""
/>
<compilejava package="abfab3d/creator"
jars=""
/>
<compilejava package="abfab3d/creator/util"
jars=""
/>
<compilejava package="abfab3d/creator/shapeways"
jars=""
/>
<compilejava package="abfab3d/creator/ui"
jars=""
/>
</target>
<target name="compileApps" depends="init" description="Compile all applications">
<echo message="Compiling Common Apps" />
<ant dir="apps/common" inheritAll="false" />
<echo message="Compiling Volume Sculptor" />
<ant dir="apps/volumesculptor" inheritAll="false" />
</target>
<target name="run" depends="compile" description="Run the application">
<echo message="jvmargs: ${jvmrunargs}" />
<java classname="${entrypoint}" fork="true">
<jvmarg line="${jvmrunargs}"/>
<classpath>
<pathelement path="${classes.dir}" />
<fileset dir="${lib.dir}" includes="**/*.jar" excludes="" />
<!-- <fileset dir="natives/${os.name}/${os.arch}" includes="**/*.jar" /> -->
</classpath>
</java>
</target>
<target name="javadoc" description="Generates javadoc" depends="compile">
<echo message="Generating javadoc..." />
<javadoc sourcepath="${src.dir}/java"
destdir="${javadocs.dir}"
packagenames="*"
version="true"
author="yes">
</javadoc>
</target>
<target name="makeRef" description="Generates VolumeSculptor Reference Guide" depends="compile">
<echo message="Generating reference guide..." />
<mkdir dir="${classes.dir}/build" />
<compilejava srcdir="src/build/java" package="doclet" destdir="${classes.dir}/build"
jars=""
/>
<javadoc sourcepath=""
destdir="${refguide.dir}"
version="true"
author="yes" >
<fileset dir="${src.dir}" defaultexcludes="yes">
<include name="java/abfab3d/datasources/TransformableDataSource.java" />
<include name="java/abfab3d/datasources/Box.java" />
<include name="java/abfab3d/datasources/Complement.java" />
<include name="java/abfab3d/datasources/Cone.java" />
<include name="java/abfab3d/datasources/Cylinder.java" />
<include name="java/abfab3d/datasources/DataSourceGrid.java" />
<include name="java/abfab3d/datasources/DataTransformer.java" />
<include name="java/abfab3d/datasources/ImageBitmap.java" />
<include name="java/abfab3d/datasources/Intersection.java" />
<include name="java/abfab3d/datasources/Plane.java" />
<include name="java/abfab3d/datasources/Ring.java" />
<include name="java/abfab3d/datasources/Sphere.java" />
<include name="java/abfab3d/datasources/Subtraction.java" />
<include name="java/abfab3d/datasources/Text.java" />
<include name="java/abfab3d/datasources/Torus.java" />
<include name="java/abfab3d/datasources/Union.java" />
<include name="java/abfab3d/datasources/VolumePatterns.java" />
<include name="java/abfab3d/transforms/CompositeTransform.java" />
<include name="java/abfab3d/transforms/FriezeSymmetry.java" />
<include name="java/abfab3d/transforms/ReflectionSymmetry.java" />
<include name="java/abfab3d/transforms/WallpaperSymmetry.java" />
<include name="java/abfab3d/transforms/PlaneReflection.java" />
<include name="java/abfab3d/transforms/SphereInversion.java" />
<include name="java/abfab3d/transforms/CompositeTransform.java" />
<include name="java/abfab3d/transforms/Scale.java" />
<include name="java/abfab3d/transforms/Translation.java" />
<include name="java/abfab3d/transforms/Rotation.java" />
<include name="java/abfab3d/transforms/RingWrap.java" />
</fileset>
<doclet name="doclet.RefGuideDoclet" path="${classes.dir}/build;${lib.dir}/commons-io-2.4.jar">
<!-- <param name="-d" value="docs/refguide" /> -->
</doclet>
</javadoc>
</target>
<target name="jar" depends="compile">
<createjar name="abfab3d_core"
version="${version}"
manifest="abfab3d_core.mf"
includes="
abfab3d/math/*
abfab3d/transforms/*
abfab3d/datasources/*
abfab3d/geom/*
abfab3d/grid/*
abfab3d/grid/maker/*
abfab3d/grid/op/*
abfab3d/grid/query/*
abfab3d/grid/util/*
abfab3d/intersect/*
abfab3d/mesh/*
abfab3d/io/input/*
abfab3d/io/output/*
abfab3d/path/*
abfab3d/util/*
"
/>
<createjar name="abfab3d_upload"
version="${version}"
manifest="abfab3d_upload.mf"
includes="abfab3d/io/soap/*
abfab3d/io/soap/transport/*
abfab3d/io/soap/encoders/*
abfab3d/io/soap/envelope/*
abfab3d/io/shapeways/*
abfab3d/transform/*
abfab3d/util/*
"
/>
<createjar name="abfab3d_creator"
version="${version}"
manifest="abfab3d_creator.mf"
includes="abfab3d/creator/*
abfab3d/creator/ui/*
abfab3d/creator/util/*
abfab3d/creator/shapeways/*
"
/>
<createjar name="abfab3d_creator_server"
version="${version}"
manifest="abfab3d_creator.mf"
includes="abfab3d/creator/*
abfab3d/creator/ui/*
abfab3d/creator/util/*
abfab3d/creator/shapeways/*
"
excludes="abfab3d/creator/shapeways/HostedKernel.class"
/>
<createjar name="abfab3d_shapeways_api"
version="${version}"
manifest="abfab3d_shapeways_api.mf"
includes="shapeways/api/*
shapeways/api/models/*
shapeways/api/models/reservation/*
shapeways/api/price/*
"
/>
</target>
<!-- Normal test without any code coverage -->
<target name="test" depends="compileTest">
<echo message="Testing Volume Sculptor" />
<ant dir="apps/volumesculptor" target="test" inheritAll="false" useNativeBasedir="true"/>
<junit printsummary="yes" haltonerror="no" haltonfailure="yes" fork="yes" showoutput="true">
<jvmarg line="${jvmrunargs}"/>
<formatter type="plain" usefile="false"/>
<batchtest fork="yes" >
<fileset dir="${test.dir}">
<include name="**/Test*.java"/>
<exclude name="**/*Performance*.java"/>
<exclude name="**/*Suite*.java"/>
<!-- Non working ones -->
<!-- <exclude name="**/TestTriangleModelCreator.java"/> -->
<exclude name="**/TestCanMoveMaterialTargetedBoundsMT.java" />
<!--
<exclude name="**/TestParametricSurfaceMaker.java" />
<exclude name="**/TestTriangulatedModels.java" />
-->
<exclude name="**/TestRegionFinder.java" />
<!-- <exclude name="**/TestDilationShapeMT.java" /> -->
<exclude name="**/TestShellFinder.java" />
</fileset>
</batchtest>
<classpath>
<pathelement path="${classes.dir}" />
<pathelement path="${test.classes.dir}" />
<fileset dir="${lib.dir}" includes="**/*.jar" />
</classpath>
</junit>
</target>
<!-- Begin Emma code coverage tasks -->
<!-- Call: ant emma runEmma -->
<target name="emma">
<property name="emma.enabled" value="true"/>
<mkdir dir="${emma.coverage.dir}" />
<!-- EMMA instr class output directory (it is important to create
this property only when EMMA is enabled:
-->
<property name="out.emma.instr.dir" value="${emma.instr.dir}" />
<mkdir dir="${out.emma.instr.dir}" />
<!-- this property, if overriden via -Demma.filter=<list of filter specs>
on ANT's command line, will set the coverage filter; by default,
all classes found in 'run.classpath' pathref will be instrumented:
-->
<property name="emma.filter" value="" />
</target>
<target name="runEmma" depends="compileTest">
<emma enabled="${emma.enabled}" >
<instr instrpathref="run.classpath"
destdir="${out.emma.instr.dir}"
metadatafile="${emma.coverage.dir}/metadata.emma"
merge="true"
>
<!-- always exclude every class with a "Test" in the name -->
<filter excludes="*Test*" />
<!-- note that coverage filters can be set through nested <filter>
elements as well: many of EMMA setting are 'mergeable' in the
sense that they can be specified multiple times and the result
is a union of all such values. Here we are not merging several
filters together but merely demonstrating that it is possible:
-->
<filter value="${emma.filter}" />
</instr>
</emma>
<junit printsummary="yes" haltonerror="no" haltonfailure="yes" fork="yes" showoutput="true">
<jvmarg line="${jvmrunargs}"/>
<formatter type="plain" usefile="false"/>
<batchtest fork="yes" >
<fileset dir="${test.dir}">
<!-- <include name="**/*Test.java"/> -->
<!--
<include name="**/Test*Suite.java"/>
<exclude name="**/Test*PerformanceSuite.java"/>
-->
<include name="**/Test*.java"/>
<exclude name="**/*Performance*.java"/>
<exclude name="**/*Suite*.java"/>
<!-- Non working ones -->
<exclude name="**/TestTriangleModelCreator.java"/>
<exclude name="**/TestCanMoveMaterialTargetedBoundsMT.java" />
<exclude name="**/TestRegionFinder.java" />
<!-- <exclude name="**/TestDilationShapeMT.java" /> -->
<exclude name="**/TestShellFinder.java" />
</fileset>
</batchtest>
<classpath>
<!-- instrumented classes must be first in the classpath: -->
<pathelement location="${out.emma.instr.dir}" />
<pathelement path="${classes.dir}" />
<pathelement path="${test.classes.dir}" />
<fileset dir="${lib.dir}" includes="**/*.jar" />
<!-- the forked JVM must have jact.jar in the classpath: -->
<path refid="emma.lib" />
</classpath>
<!-- to be certain, tell EMMA runtime where to dump the runtime
coverage data (otherwise the filename is relative to the JVM's
current directory and it is easy to get confused about what
that is):
-->
<jvmarg value="-Demma.coverage.out.file=${emma.coverage.dir}/coverage.emma" />
<jvmarg value="-Demma.coverage.out.merge=true" />
</junit>
<!-- if enabled, generate coverage report(s): -->
<emma enabled="${emma.enabled}" >
<report sourcepath="${src.dir}/java"
sort="+block,+name,+method,+class"
metrics="method:70,block:80,line:80,class:100"
>
<!-- collect all EMMA data dumps (metadata and runtime)
[this can be done via nested <fileset> fileset elements
or <file> elements pointing to a single file]:
-->
<fileset dir="${emma.coverage.dir}" >
<include name="*.emma" />
</fileset>
<!-- for every type of report desired, configure a nested
element; various report parameters
can be inherited from the parent <report>
and individually overridden for each report type:
-->
<txt outfile="${emma.coverage.dir}/coverage.txt"
depth="package"
columns="class,method,block,line,name"
/>
<xml outfile="${emma.coverage.dir}/coverage.xml"
depth="package"
/>
<html outfile="${emma.coverage.dir}/coverage.html"
depth="method"
columns="name,class,method,block,line"
/>
</report>
</emma>
</target>
<!-- Begin Cobertura code coverage tasks -->
<!-- Call: ant runCobertura -->
<target name="-cobertura">
<mkdir dir="${cobertura.instrumented.dir}" />
<mkdir dir="${cobertura.reports.xml.dir}" />
<mkdir dir="${cobertura.reports.html.dir}" />
<mkdir dir="${cobertura.coverage.xml.dir}" />
<mkdir dir="${cobertura.coverage.summaryxml.dir}" />
<mkdir dir="${cobertura.coverage.html.dir}" />
</target>
<target name="-coberturaInstr">
<!-- Remove the coverage data file and any old instrumentation. -->
<delete file="cobertura.ser"/>
<delete dir="${cobertura.instrumented.dir}" />
<!--
Instrument the application classes, writing the
instrumented classes into ${build.cobertura.instrumented.dir}.
-->
<cobertura-instrument todir="${cobertura.instrumented.dir}">
<!--
The following line causes instrument to ignore any
source line containing a reference to log4j, for the
purposes of coverage reporting.
-->
<ignore regex="org.apache.log4j.*" />
<fileset dir="${classes.dir}">
<!--
Instrument all the application classes, but
don't instrument the test classes.
-->
<include name="**/*.class" />
<exclude name="**/*Test.class" />
<exclude name="**/Test*.class" />
</fileset>
</cobertura-instrument>
</target>
<target name="runCobertura" depends="compileTest">
<antcall target="-cobertura" />
<antcall target="-coberturaInstr" />
<junit printsummary="yes" haltonerror="no" haltonfailure="yes" fork="yes" showoutput="true">
<jvmarg line="${jvmrunargs}"/>
<formatter type="plain" usefile="false"/>
<batchtest fork="yes" todir="${cobertura.reports.xml.dir}" >
<fileset dir="${test.dir}">
<!-- <include name="**/*Test.java"/> -->
<include name="**/Test*Suite.java"/>
</fileset>
</batchtest>
<classpath>
<pathelement path="${cobertura.instrumented.dir}" />
<pathelement path="${classes.dir}" />
<pathelement path="${test.classes.dir}" />
<fileset dir="${lib.dir}" includes="**/*.jar" />
</classpath>
<classpath refid="cobertura.classpath" />
</junit>
<junitreport todir="${cobertura.reports.xml.dir}">
<fileset dir="${cobertura.reports.xml.dir}">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="${cobertura.reports.html.dir}" />
</junitreport>
<antcall target="-coverage" />
</target>
<target name="coverage-check">
<cobertura-check branchrate="34" totallinerate="100" />
</target>
<target name="-coverage">
<!--
Generate a series of HTML files containing the coverage
data in a user-readable form using nested source filesets.
-->
<cobertura-report destdir="${cobertura.coverage.html.dir}">
<fileset dir="${src.dir}/java">
<include name="**/*.java"/>
</fileset>
</cobertura-report>
</target>
<target name="-xmlCoverage">
<!--
Generate an XML file containing the coverage data using
the "srcdir" attribute.
-->
<cobertura-report srcdir="${src.dir}" destdir="${cobertura.coverage.xml.dir}" format="xml" />
</target>
<target name="-xmlSummaryCoverage">
<!--
Generate an summary XML file containing the coverage data using
the "srcdir" attribute.
-->
<cobertura-report srcdir="${src.dir}" destdir="${cobertura.coverage.summaryxml.dir}" format="summaryXml" />
</target>
<!-- End code coverage tasks -->
<target name="compileTest" depends="init" description="Compile all Test source files">
<mkdir dir="${test.classes.dir}" />
<compilejava destdir="${test.classes.dir}" srcdir="${test.dir}" package="abfab3d" jars="**/*.jar" />
<compilejava destdir="${test.classes.dir}" srcdir="${test.dir}" package="abfab3d/path" jars="**/*.jar" />
<compilejava destdir="${test.classes.dir}" srcdir="${test.dir}" package="abfab3d/grid" jars="**/*.jar" />
<compilejava destdir="${test.classes.dir}" srcdir="${test.dir}" package="abfab3d/grid/util" jars="**/*.jar" />
<compilejava destdir="${test.classes.dir}" srcdir="${test.dir}" package="abfab3d/grid/op" jars="**/*.jar" />
<compilejava destdir="${test.classes.dir}" srcdir="${test.dir}" package="abfab3d/grid/query" jars="**/*.jar" />
<compilejava destdir="${test.classes.dir}" srcdir="${test.dir}" package="abfab3d/io/output" jars="**/*.jar" />
<compilejava destdir="${test.classes.dir}" srcdir="${test.dir}" package="abfab3d/io/input" jars="**/*.jar" />
<compilejava destdir="${test.classes.dir}" srcdir="${test.dir}" package="abfab3d/transform" jars="**/*.jar" />
<compilejava destdir="${test.classes.dir}" srcdir="${test.dir}" package="abfab3d/util" jars="**/*.jar" />
<compilejava destdir="${test.classes.dir}" srcdir="${test.dir}" package="abfab3d/geom" jars="**/*.jar" />
<compilejava destdir="${test.classes.dir}" srcdir="${test.dir}" package="abfab3d/datasources" jars="**/*.jar" />
<compilejava destdir="${test.classes.dir}" srcdir="${test.dir}" package="abfab3d/transforms" jars="**/*.jar" />
<compilejava destdir="${test.classes.dir}" srcdir="${test.dir}" package="abfab3d/mesh" jars="**/*.jar" />
<compilejava destdir="${test.classes.dir}" srcdir="${test.dir}" package="" jars="**/*.jar" />
</target>
<target name="testSpecific" depends="compile,compileTest">
<echo message="running testSpecific ${test} jvmargs: ${jvmrunargs}" />
<junit printsummary="yes" haltonerror="no" haltonfailure="yes" fork="yes" showoutput="yes">
<jvmarg line="${jvmrunargs}"/>
<formatter type="plain" usefile="false"/>
<batchtest fork="yes" >
<fileset dir="${test.dir}">
<include name="**/${test}.java"/>
</fileset>
</batchtest>
<classpath>
<pathelement path="${classes.dir}" />
<pathelement path="${test.classes.dir}" />
<fileset dir="${lib.dir}" includes="**/*.jar" />
</classpath>
</junit>
</target>
<target name="runMain" depends="compile,compileTest" description="Run the application">
<echo message="jvmargs: ${jvmrunargs}" />
<java classname="${class}" fork="true">
<jvmarg line="${jvmrunargs}"/>
<classpath>
<pathelement path="${classes.dir}" />
<fileset dir="${lib.dir}" includes="**/*.jar" excludes="" />
<pathelement path="${test.classes.dir}" />
<!-- <fileset dir="natives/${os.name}/${os.arch}" includes="**/*.jar" /> -->
</classpath>
</java>
</target>
<!-- Begin Japex Tasks -->
<target name="runJapex" depends="compile,compileJapex">
<java dir="." fork="true" classname="com.sun.japex.Japex">
<classpath>
<pathelement path="${classes.dir}" />
<pathelement path="${japex.classes.dir}" />
<fileset dir="${lib.dir}" includes="**/*.jar" />
</classpath>
<arg line="test/japex/speed-config.xml"/>
<jvmarg value="-Xmx4000M" />
</java>
</target>
<target name="runJapexMemory" depends="compile,compileJapex">
<java dir="." fork="true" classname="com.sun.japex.Japex">
<classpath>
<pathelement path="${classes.dir}" />
<pathelement path="${japex.classes.dir}" />
<fileset dir="${lib.dir}" includes="**/*.jar" />
</classpath>
<arg line="test/japex/memory-config.xml"/>
<jvmarg value="-Xmx5000M" />
</java>
</target>
<target name="compileJapex" depends="init" description="Compile all Japex source files">
<mkdir dir="${japex.classes.dir}" />
<compilejava destdir="${japex.classes.dir}" srcdir="${japex.dir}" package="abfab3d/grid" jars="j3d-org-all_2.0.0.jar support/japex/*.jar" />
</target>
<!-- End Japex Tests -->
<target name="clean" description="Deletes all the generated artifacts.">
<delete dir="${javadocs.dir}" />
<delete dir="${classes.dir}" />
<delete dir="${emma.out.dir}"/>
<delete dir="${cobertura.out.dir}"/>
</target>
<target name="updateXj3D">
<copy todir="${lib.dir}" includeEmptyDirs="false">
<fileset dir="${xj3d.dir}/jars" excludes="org.* xj3d-all*.jar xj3d-imm*.jar xj3d-int*.jar">
<depth max="0" />
</fileset>
</copy>
</target>
<target name="stageSource" >
<tstamp>
<format property="DATE" pattern="yyyy-MM-dd" locale="en,US" />
</tstamp>
<tar destfile="release/abfab3d_source_${version}_${DATE}.tar.gz" compression="gzip" basedir="${basedir}" includes="**" excludes="release/** **/*.war **/wttest/*"/>
</target>
<target name="stageApps" >
<tstamp>
<format property="DATE" pattern="yyyy-MM-dd" locale="en,US" />
</tstamp>
<tar destfile="release/abfab3d_source_${version}_${DATE}.tar.gz" compression="gzip" basedir="${basedir}" includes="**" excludes="release/**"/>
</target>
<target name="stageLib">
<tstamp>
<format property="DATE" pattern="yyyy-MM-dd" locale="en,US" />
</tstamp>
<mkdir dir="${release.dir}/bin"/>
<copy todir="${release.dir}/bin">
<fileset dir="${jar.dir}" includes="**.jar" />
<fileset dir="${lib.dir}" includes="**.jar" />
</copy>
<tar destfile="release/abfab3d_lib_${version}_${DATE}.tar.gz" compression="gzip" basedir="${release.dir}/bin" includes="**" />
</target>
<target name="release" depends="build">
<tstamp>
<format property="DATE" pattern="yyyy-MM-dd" locale="en,US" />
</tstamp>
<delete dir="${release.dir}" failonerror="false" />
<mkdir dir="${release.dir}"/>
<ant target="stageLib" />
<ant target="stageSource" />
</target>
<target name="runSpeed" depends="" description="Run the application">
<java classname="abfab3d.grid.TestMultiThreaded" fork="true">
<jvmarg line="${jvmrunargs}"/>
<classpath>
<pathelement path="${classes.dir}" />
<pathelement path="${test.classes.dir}" />
<fileset dir="${lib.dir}" includes="**/*.jar" excludes="" />
</classpath>
</java>
</target>
</project>