forked from beanshell/beanshell
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
681 lines (586 loc) · 21.3 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
<!--
Ant build file for BeanShell
http://www.beanshell.org/
Uses Ant 1.6
http://www.apache.org/
Ant issues -
- Why can't I nest filesets? This seems like it would be so easy and
useful...
-->
<project name="beanshell" default="compile" basedir=".">
<!-- Project Configuration -->
<property name="file" value=""/>
<property name="version" value="2.1.0-SNAPSHOT"/>
<property name="deprecation" value="on"/>
<!-- choose an alternate compiler -->
<!--
<property name="build-compiler" value="jikes"/>
<property name="build-compiler" value="modern"/>
-->
<property name="src-dir" value="src" />
<property name="build-dir" value="classes" />
<property name="lib-dir" value="lib" />
<property name="dist-dir" value="dist" />
<property name="test-src-dir" value="tests/src" />
<property name="javadoc-dir" value="javadoc" />
<property name="bsf-src-dir" value="bsf/src" />
<property name="engine-src-dir" value="engine/src" />
<property name="engine-config"
value="engine/config/javax.script.ScriptEngineFactory" />
<property name="classgen-src-dir" value="asm/src" />
<property name="javacc-lib"
value="${lib-dir}/javacc.jar"/>
<!--
Optional things you can't build under older versions of Java
or which require optional packages.
I think we can automate this in ant... deal with it later.
-->
<!-- Uncomment to build under JDK1.2 without warnings
<property name="exclude-1.2"
value="bsh/XThis.java,bsh/util/ClassBrowser.java"/>
-->
<!-- Uncomment to build under JDK1.1 without warnings
<property name="exclude-1.1"
value="bsh/JThis.java,bsh/classpath/*,bsh/util/*,bsh/reflect/*,bsh/ExternalNameSpace.java"/>
-->
<!-- Uncomment to build without making the BSF adapter
<property name="exclude-bsf"
value="bsh/util/BeanShellBSFEngine.java,TestBshBSF.java"/>
-->
<!-- Uncomment to build without making the javax.script (JSR223) adapter
<property name="exclude-engine" value="bsh/engine/**"/>
-->
<!-- Uncomment to build without the ASM class generator code.
<property name="exclude-classgen"
value="bsh/org/objectweb/asm/**,bsh/ClassGeneratorImpl.java,bsh/ClassGeneratorUtil.java,bsh/DelayedEvalBshMethod.java"/>
-->
<!-- Uncomment to build without making the servlet package
<property name="exclude-servlet"
value="bsh/servlet/*"/>
-->
<!-- Legacy excludes. Comment this *out* to build these legacy items -->
<property name="excludes-legacy"
value="bsh/JThis.java"/>
<!-- Arbitrary excludes. Comment this out to build these experimental or
other items which we've decided not to build right now.
<property name="excludes-arbitrary"
value="bsh/ExternalNameSpace.java"/>
-->
<!-- Add up all of the excludes -->
<!-- how do I add strings to break this long line? -->
<property name="excludes"
value="${exclude-1.2},${exclude-1.1},${exclude-bsf},${exclude-engine},${exclude-servlet},${excludes-legacy},${exclude-classgen},${excludes-arbitrary}"/>
<!-- JARs -->
<property name="javadoc-zip" value="${dist-dir}/bsh-${version}-javadoc.zip"/>
<property name="core-jar" value="${dist-dir}/bsh-core-${version}.jar"/>
<property name="src-zip" value="${dist-dir}/bsh-${version}-src.zip"/>
<property name="src-jar" value="${dist-dir}/bsh-${version}-sources.jar"/>
<property name="pom" value="${dist-dir}/bsh-${version}.pom"/>
<property name="all-jar-name" value="bsh-${version}.jar"/>
<property name="all-jar" value="${dist-dir}/${all-jar-name}"/>
<property name="commands-jar"
value="${dist-dir}/bsh-commands-${version}.jar"/>
<property name="classpath-jar"
value="${dist-dir}/bsh-classpath-${version}.jar"/>
<property name="reflect-jar"
value="${dist-dir}/bsh-reflect-${version}.jar"/>
<property name="util-jar" value="${dist-dir}/bsh-util-${version}.jar"/>
<property name="bsf-jar" value="${dist-dir}/bsh-bsf-${version}.jar"/>
<property name="engine-jar" value="${dist-dir}/bsh-engine-${version}.jar"/>
<property name="classgen-jar" value="${dist-dir}/bsh-classgen-${version}.jar"/>
<property name="bshservlet-wbsh-war"
value="${dist-dir}/bshservlet-wbsh.war"/>
<property name="bshservlet-war" value="${dist-dir}/bshservlet.war"/>
<!-- Put the auto-generated command doc in the manual dir -->
<property name="commands-bshdoc"
value="docs/manual/bshcommands-bshdoc.xml"/>
<!-- Begin Targets -->
<!-- The javacc targets could be smarter... -->
<target name="checkjjt">
<uptodate property="jjtree.notRequired"
targetfile="${src-dir}/bsh/bsh.jj"
>
<srcfiles dir="${src-dir}/bsh" includes="bsh.jjt"/>
</uptodate>
</target>
<target name="checkjj">
<uptodate property="javacc.notRequired"
targetfile="${src-dir}/bsh/Parser.java"
>
<srcfiles dir="${src-dir}/bsh" includes="bsh.jj"/>
</uptodate>
</target>
<!-- Create bsh.jj when bsh.jjt changes. -->
<target name="jjtree" unless="jjtree.notRequired" depends="checkjjt">
<java classname="jjtree"
fork="yes"
failonerror="yes" >
<arg
line="-OUTPUT_DIRECTORY=${src-dir}/bsh ${src-dir}/bsh/bsh.jjt"/>
<classpath>
<fileset refid="lib-fileset"/>
</classpath>
</java>
</target>
<!-- Create Parser.java when bsh.jj changes. -->
<target name="javacc" unless="javacc.notRequired" depends="checkjj">
<java classname="javacc"
fork="yes"
failonerror="yes"
classpath="${javacc-lib}">
<arg line="-OUTPUT_DIRECTORY=${src-dir}/bsh ${src-dir}/bsh/bsh.jj"/>
<classpath>
<fileset refid="lib-fileset"/>
</classpath>
</java>
</target>
<target name="compile" depends="jjtree,javacc,builddir">
<!-- exclude the ${excludes} as well as anything under a "bak" dir -->
<!--compiler="${build-compiler}"-->
<!--echo>Debug ON!</echo>-->
<javac
srcdir="${src-dir}:${test-src-dir}:${bsf-src-dir}:${engine-src-dir}:${classgen-src-dir}"
destdir="${build-dir}"
deprecation="${deprecation}"
optimize="on"
debug="on"
target="1.5"
includes="**/*.java"
excludes="${excludes},**/bak/**"
>
<classpath>
<fileset refid="lib-fileset"/>
</classpath>
</javac>
<copy todir="${build-dir}">
<fileset dir="${src-dir}">
<!-- install the bsh commands -->
<patternset refid="commands-bsh-patternset"/>
<!-- install the util/lib stuff -->
<patternset refid="util-lib-patternset"/>
<!-- need to break this into a separate target to use exclude -->
<!-- install the servlet stuff -->
<patternset refid="bshservlet-patternset"/>
</fileset>
<!-- install bsh commands used in tests -->
<fileset dir="${test-src-dir}">
<patternset>
<include name="**/*.bsh"/>
</patternset>
</fileset>
</copy>
<!-- Install the javax.script engine factory config -->
<copy file="${engine-config}" todir="${build-dir}/META-INF/services" />
<tstamp>
<format property="DATE" pattern="yyyy-MM-dd hh:mm:ss" />
</tstamp>
</target>
<target name="javadoc" depends="compile">
<mkdir dir="${javadoc-dir}" />
<javadoc packagenames="bsh,bsh.util,bsh.classpath,bsh.reflect"
sourcepath="${src-dir}:${classgen-src-dir}"
destdir="${javadoc-dir}"
author="true"
version="true"
source="1.5"
use="true"
windowtitle="BeanShell ${version}"
doctitle="<h1>BeanShell ${version}<h1>"
bottom="<em>© 2000-2005 [email protected] :-)</em>"
/>
</target>
<!-- Jar target setup -->
<!--
<target name="superclean" description="Remove any generated files.">
</target>
-->
<target name="clean">
<delete quiet="true" dir="${build-dir}"/>
<delete quiet="true" dir="${javadoc-dir}"/>
<delete quiet="true" dir="${dist-dir}"/>
<!-- clear the junit reports: -->
<delete quiet="true" dir="${junit-reports}" />
<!-- Moved to dist dir
<delete quiet="true" file="${javadoc-jar}"/>
<delete quiet="true" file="${src-jar}"/>
<delete quiet="true" file="${core-jar}"/>
<delete quiet="true" file="${all-jar}"/>
<delete quiet="true" file="${util-jar}"/>
<delete quiet="true" file="${classpath-jar}"/>
<delete quiet="true" file="${commands-jar}"/>
<delete quiet="true" file="${reflect-jar}"/>
<delete quiet="true" file="${bsf-jar}"/>
<delete quiet="true" file="${engine-jar}"/>
<delete quiet="true" file="${classgen-jar}"/>
<delete quiet="true" file="${bshservlet-wbsh-war}"/>
<delete quiet="true" file="${bshservlet-war}"/>
-->
<delete quiet="true" file="${commands-bshdoc}"/>
<!-- hack -->
<delete quiet="true" file="bshcommands.html"/>
</target>
<target name="builddir">
<mkdir dir="${build-dir}" />
</target>
<!-- Begin: Filesets -->
<fileset id="lib-fileset" dir="${lib-dir}">
<patternset>
<include name="*.jar"/>
</patternset>
</fileset>
<fileset id="core-fileset" dir="${build-dir}">
<patternset>
<include name="bsh/*.class"/>
<!-- something funny here... Console ends up in jarall, but not Remote -->
<exclude name="bsh/Console.class"/>
<exclude name="bsh/Remote*"/>
<exclude name="bsh/ClassGeneratorImpl*"/>
<exclude name="bsh/ClassGeneratorUtil*"/>
<exclude name="bsh/DelayedEvalBshMethod*"/>
</patternset>
</fileset>
<fileset id="classpath-fileset" dir="${build-dir}">
<patternset>
<include name="bsh/classpath/*.class"/>
</patternset>
</fileset>
<fileset id="reflect-fileset" dir="${build-dir}">
<patternset>
<include name="bsh/reflect/*.class"/>
</patternset>
</fileset>
<fileset id="collection-fileset" dir="${build-dir}">
<patternset>
<include name="bsh/collection/*.class"/>
</patternset>
</fileset>
<fileset id="bsf-fileset" dir="${build-dir}">
<patternset>
<include name="bsh/util/BeanShellBSFEngine.class"/>
</patternset>
</fileset>
<fileset id="engine-fileset" dir="${build-dir}">
<patternset>
<include name="bsh/engine/**.class"/>
<include name="META-INF/services/javax.script*"/>
</patternset>
</fileset>
<fileset id="classgen-fileset" dir="${build-dir}">
<patternset>
<include name="bsh/ClassGeneratorImpl*.class"/>
<include name="bsh/ClassGeneratorUtil*.class"/>
<include name="bsh/DelayedEvalBshMethod*.class"/>
<include name="bsh/org/objectweb/asm/**/*.class"/>
</patternset>
</fileset>
<fileset id="bshservlet-fileset" dir="${build-dir}">
<patternset id="bshservlet-patternset">
<include name="bsh/servlet/*.class"/>
<include name="bsh/servlet/*.bsh"/>
<include name="bsh/servlet/*.template"/>
</patternset>
</fileset>
<fileset id="commands-fileset" dir="${build-dir}">
<patternset>
<include name="bsh/commands/*.class"/>
</patternset>
<patternset id="commands-bsh-patternset">
<include name="bsh/commands/*.bsh"/>
<exclude name="CVS"/>
<exclude name=".svn"/>
</patternset>
</fileset>
<fileset id="util-fileset" dir="${build-dir}">
<patternset>
<include name="bsh/util/*.class"/>
<exclude name="bsh/util/BeanShellBSFEngine.class"/>
</patternset>
<patternset id="util-lib-patternset">
<include name="bsh/util/lib/*"/>
<exclude name="CVS"/>
<exclude name=".svn"/>
</patternset>
</fileset>
<!-- End: Filesets -->
<!-- Jar targets -->
<target name="jarcore" depends="compile,_distdir">
<delete file="${core-jar}"/>
<jar jarfile="${core-jar}">
<manifest>
<attribute name="Main-Class" value="bsh.Interpreter" />
<attribute name="Specification-Title" value="BeanShell core" />
<attribute name="Specification-Version" value="${version}" />
<attribute name="Specification-Vendor" value="http://www.beanshell.org/" />
<attribute name="Implementation-Version" value="${version} ${DATE}" />
<attribute name="Implementation-Vendor" value="Pat Niemeyer ([email protected])" />
</manifest>
<fileset refid="core-fileset"/>
</jar>
</target>
<target name="jarall" depends="compile,_distdir">
<delete file="${all-jar}"/>
<jar jarfile="${all-jar}">
<manifest>
<attribute name="Main-Class" value="bsh.Console" />
<attribute name="Specification-Title" value="BeanShell" />
<attribute name="Specification-Version" value="${version}" />
<attribute name="Specification-Vendor" value="http://www.beanshell.org/" />
<attribute name="Implementation-Version" value="${version} ${DATE}" />
<attribute name="Implementation-Vendor" value="Pat Niemeyer ([email protected])" />
</manifest>
<fileset refid="core-fileset"/>
<fileset refid="classpath-fileset"/>
<fileset refid="reflect-fileset"/>
<fileset refid="collection-fileset"/>
<fileset refid="util-fileset"/>
<fileset refid="commands-fileset"/>
<fileset refid="bsf-fileset"/>
<fileset refid="engine-fileset"/>
<fileset refid="classgen-fileset"/>
<fileset refid="bshservlet-fileset"/>
<!-- hack, see core-fileset -->
<fileset dir="${build-dir}">
<patternset>
<include name="bsh/Remote.class"/>
<include name="bsh/Console.class"/>
</patternset>
</fileset>
</jar>
</target>
<target name="zipsrc" depends="_distdir">
<delete file="${src-zip}"/>
<zip zipfile="${src-zip}">
<zipfileset dir="." prefix="BeanShell-${version}">
<exclude name="classes*"/>
<exclude name="classes/**/*"/>
<exclude name="dist*"/>
<exclude name="dist/**/*"/>
<exclude name="*javadoc*"/>
<exclude name="javadoc/**/*"/>
<!--exclude name="docs/**/*"/-->
<exclude name="**/CVS"/>
<exclude name="**/.svn"/>
</zipfileset>
</zip>
</target>
<target name="jarsrc" depends="_distdir">
<delete file="${src-jar}"/>
<zip zipfile="${src-jar}">
<zipfileset dir="src" prefix="">
<include name="**/*.java"/>
<exclude name="**/CVS"/>
<exclude name="**/.svn"/>
</zipfileset>
</zip>
</target>
<target name="pom" depends="_distdir">
<delete file="${pom}"/>
<copy file="pom.xml" tofile="${pom}" />
</target>
<target name="_distdir">
<mkdir dir="${dist-dir}" />
</target>
<target name="jarfileset">
<delete file="${target-jar}"/>
<jar jarfile="${target-jar}">
<manifest>
<attribute name="Specification-Title" value="${specification-title}" />
<attribute name="Specification-Version" value="${version}" />
<attribute name="Specification-Vendor" value="http://www.beanshell.org/" />
<attribute name="Implementation-Version" value="${version} ${DATE}" />
<attribute name="Implementation-Vendor" value="Pat Niemeyer ([email protected])" />
</manifest>
<fileset refid="${fileset}"/>
</jar>
</target>
<!-- Make all of the dist jars -->
<target name="dist" depends="_distdir,compile,jarcore,jarall,javadoc,zipsrc,jarsrc,pom,bshservlet-war,bshservlet-wbsh-war,bshdoc">
<antcall target="jarfileset">
<param name="target-jar" value="${commands-jar}"/>
<param name="specification-title" value="BeanShell commands"/>
<param name="fileset" value="commands-fileset"/>
</antcall>
<antcall target="jarfileset">
<param name="target-jar" value="${classpath-jar}"/>
<param name="specification-title" value="BeanShell classpath"/>
<param name="fileset" value="classpath-fileset"/>
</antcall>
<antcall target="jarfileset">
<param name="target-jar" value="${reflect-jar}"/>
<param name="specification-title" value="BeanShell reflect"/>
<param name="fileset" value="reflect-fileset"/>
</antcall>
<antcall target="jarfileset">
<param name="target-jar" value="${util-jar}"/>
<param name="specification-title" value="BeanShell util"/>
<param name="fileset" value="util-fileset"/>
</antcall>
<antcall target="jarfileset">
<param name="target-jar" value="${bsf-jar}"/>
<param name="specification-title" value="BeanShell bsf"/>
<param name="fileset" value="bsf-fileset"/>
</antcall>
<antcall target="jarfileset">
<param name="target-jar" value="${engine-jar}"/>
<param name="specification-title" value="BeanShell JSR223 Engine"/>
<param name="fileset" value="engine-fileset"/>
</antcall>
<antcall target="jarfileset">
<param name="target-jar" value="${classgen-jar}"/>
<param name="specification-title" value="BeanShell classgen"/>
<param name="fileset" value="classgen-fileset"/>
</antcall>
<delete file="${javadoc-zip}"/>
<zip zipfile="${javadoc-zip}" basedir="${javadoc-dir}"/>
<checksum fileext=".sha1" algorithm="SHA" forceoverwrite="true">
<fileset dir="${dist-dir}">
<include name="*.zip" />
<include name="*.jar" />
<include name="*.pom" />
</fileset>
</checksum>
<!-- Build the documentation -->
<!-- Don't build the documentation right now.
It's breaking the jakarta GUMP build for some reason.
<ant dir="docs/manual"/>
-->
</target>
<target name="bshservlet-war" depends="compile" unless="exclude-servlet">
<war warfile="${bshservlet-war}"
webxml="${src-dir}/bsh/servlet/example-web.xml">
<manifest>
<attribute name="Specification-Title" value="BeanShell webapp" />
<attribute name="Specification-Version" value="${version}" />
<attribute name="Specification-Vendor" value="http://www.beanshell.org/" />
<attribute name="Implementation-Version" value="${version} ${DATE}" />
<attribute name="Implementation-Vendor" value="Pat Niemeyer ([email protected])" />
</manifest>
<!--classes dir="${build-dir}" includes="bsh/servlet/**/*"/-->
<fileset dir="${src-dir}/bsh/servlet/" includes="index.html"/>
</war>
</target>
<target name="bshservlet-wbsh-war"
depends="compile,jarall" unless="exclude-servlet">
<war warfile="${bshservlet-wbsh-war}"
webxml="${src-dir}/bsh/servlet/example-web.xml">
<manifest>
<attribute name="Specification-Title" value="BeanShell webapp" />
<attribute name="Specification-Version" value="${version}" />
<attribute name="Specification-Vendor" value="http://www.beanshell.org/" />
<attribute name="Implementation-Version" value="${version} ${DATE}" />
<attribute name="Implementation-Vendor" value="Pat Niemeyer ([email protected])" />
</manifest>
<!--classes dir="${build-dir}" includes="bsh/servlet/**/*"/-->
<fileset dir="${src-dir}/bsh/servlet/" includes="index.html"/>
<lib dir="${dist-dir}" includes="${all-jar-name}"/>
</war>
</target>
<!--
This target produces XML source for beanshell documentation of the
bsh command set.
The bshdoc script requires Java 1.4 for regular expressions.
Notes:
- I am concerned that the fileset argument could be too large for
parallel if ant is using full path names. But the bshdoc script
wants all of the files simultaneously to produce one XML file
amenable to indexing, etc.
- Needs some file timestamp checking... mapper tag might help.
The output goes in the docs area, which has its own build file.
-->
<target name="bshdoc" depends="jarall">
<!--
I'd like to use the java target, but there seems to be no way
to supply a fileset in an arg argument.
-->
<apply executable="java" output="${commands-bshdoc}" parallel="true">
<arg value="-cp"/>
<arg value="${all-jar}"/>
<arg value="bsh.Interpreter"/>
<arg file="scripts/bshdoc.bsh"/>
<!--fileset refid="commands-fileset"/-->
<fileset dir="src/bsh/commands" includes="*.bsh"/>
</apply>
</target>
<!--
Run a script specified in the file property using the build
classpath (e.g. latest compiled version)
ant -Dfile=foo.bsh bsh
-->
<target name="bsh" depends="compile">
<java classname="bsh.Interpreter" fork="true">
<classpath>
<pathelement location="${build-dir}"/>
<fileset refid="lib-fileset"/>
</classpath>
<arg value="${file}"/>
</java>
</target>
<!--
Set up some properties for use with the testing framework
-->
<property name="junit.jar" value="${lib-dir}/testing/junit-4.8.2.jar"/>
<!-- JUnit source files. -->
<property name="junit-test-src-dir" value="tests/junitTests/src" />
<!-- Directory to store the junit reports in. Deleted on a clean. -->
<property name="junit-reports" value="tests/junit-reports" />
<!-- Set up a classpath for use when testing the project: -->
<path id="test-classpath">
<pathelement location="${build-dir}"/>
<pathelement location="${junit.jar}"/>
<fileset refid="lib-fileset"/>
</path>
<target name="build-junit-tests"
depends="compile" >
<!-- description="Builds the JUnit Test suite."> -->
<javac srcdir="${junit-test-src-dir}"
destdir="${build-dir}"
debug="on"
debuglevel="lines,vars,source"
>
<classpath>
<path refid="test-classpath"/>
</classpath>
</javac>
</target>
<target name="junit-tests" depends="build-junit-tests">
<!-- description="Runs the JUnit test suite."> -->
<mkdir dir="${junit-reports}" />
<junit printsummary="yes" haltonfailure="no" fork="yes">
<sysproperty key="skip_known_issues" value=""/>
<classpath>
<path refid="test-classpath"/>
</classpath>
<assertions enableSystemAssertions="true"/>
<formatter type="brief" usefile="true"/>
<batchtest todir="${junit-reports}">
<fileset dir="${junit-test-src-dir}">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="junit-tests-all" depends="build-junit-tests">
<!-- description="Runs the JUnit test suite."> -->
<mkdir dir="${junit-reports}" />
<junit printsummary="yes" haltonfailure="no" fork="yes">
<classpath>
<path refid="test-classpath"/>
</classpath>
<assertions enableSystemAssertions="true"/>
<formatter type="brief" usefile="true"/>
<batchtest todir="${junit-reports}">
<fileset dir="${junit-test-src-dir}">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<!--
Run the script-based test suite.
-->
<target name="test">
<antcall target="bsh">
<param name="file" value="tests/test-scripts/RunAllTests.bsh"/>
</antcall>
</target>
</project>