1 |
<project name="jsr166" default="usage"> |
<project name="jsr166" default="usage"> |
2 |
|
|
3 |
<description> |
<description> |
4 |
Build file for JSR-166 |
------------------------------------------------------------------------------ |
5 |
|
Build file for JSR-166 |
6 |
|
|
7 |
JUnit 3.8 or better must be in ${ant.home}/lib for the test target to work. |
Usage: ant [target] |
|
</description> |
|
8 |
|
|
9 |
|
User-specific settings are read from user.properties. |
10 |
|
See user.properties.sample for an explanation of some useful settings. |
11 |
|
------------------------------------------------------------------------------ |
12 |
|
</description> |
13 |
|
|
14 |
<target name="usage" description="Prints this message"> |
<target name="usage" description="Advises user to run with -projecthelp"> |
15 |
<echo> |
<echo>Run "ant -projecthelp" for full usage information.</echo> |
|
ant [target], where target is one of: |
|
|
|
|
|
usage (default) Prints this message |
|
|
compile Compiles all sources to build folder |
|
|
jar Builds library jar from compiled sources |
|
|
test Runs all tests (requires JUnit 1.8 in ${ant.home}/lib) |
|
|
docs Builds javadocs with custom tags to build folder |
|
|
dist-docs Builds javadocs without custom tags to dist folder |
|
|
dist Puts all distributable products in single hierarchy |
|
|
|
|
|
clean Removes all build products |
|
|
dist-clean Removes all build and distribution products |
|
|
|
|
|
checkstyle Reports on style errors in Java source (verbose, mostly chaff) |
|
|
doccheck Reports on javadoc style errors (not working yet) |
|
|
</echo> |
|
16 |
</target> |
</target> |
17 |
|
|
18 |
|
|
19 |
<!-- User-specific settings --> |
<!-- User-specific settings --> |
20 |
<property file="user.properties"/> |
<property file="user.properties"/> |
21 |
|
|
|
<!-- Set build.warnings in user.properties to turn on -warnunchecked --> |
|
|
<!-- <property name="build.warnings" value=""/> --> |
|
|
|
|
22 |
|
|
23 |
<!-- Compilation options --> |
<!-- Compilation options --> |
24 |
<property name="build.sourcelevel" value="1.5"/> |
<property name="build.sourcelevel" value="1.5"/> |
54 |
|
|
55 |
<!-- Jar locations --> |
<!-- Jar locations --> |
56 |
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
|
<property name="javac.jar" location="${lib.dir}/javac.jar"/> |
|
|
<property name="collect.jar" location="${lib.dir}/collect.jar"/> |
|
57 |
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
58 |
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
59 |
|
|
60 |
|
|
61 |
|
|
62 |
<!-- |
<!-- Files excluded from dist-docs and emulation jar --> |
63 |
! Bootclasspath munging for source compilation. |
<patternset id="unsafe.exclusion"> |
|
--> |
|
|
|
|
|
<path id="javac.bootclasspath.prefix"> |
|
|
<!-- <pathelement location="${src.dir}"/> --> |
|
|
<pathelement location="${javac.jar}"/> |
|
|
</path> |
|
|
|
|
|
<path id="javac.bootclasspath"> |
|
|
<!-- <pathelement location="${src.dir}"/> --> |
|
|
<pathelement location="${collect.jar}"/> |
|
|
<pathelement location="${rt.jar}"/> |
|
|
</path> |
|
|
|
|
|
<!-- Flatten bootclasspath prefix into a platform-appropriate string --> |
|
|
<property name="javac.bootclasspath.prefix" refid="javac.bootclasspath.prefix"/> |
|
|
|
|
|
<!-- Turn the flattened bootclasspath prefix into a javac argument --> |
|
|
<property name="javac.args" value='-J-Xbootclasspath/p:${javac.bootclasspath.prefix}'/> |
|
|
|
|
|
|
|
|
|
|
|
<!-- |
|
|
! Bootclasspath munging for testing, so JUnit can test our local |
|
|
! modifications to java.*. |
|
|
--> |
|
|
|
|
|
<path id="test.classpath"> |
|
|
<pathelement location="${product.jar}"/> |
|
|
<pathelement location="${build.testcases.dir}"/> |
|
|
<pathelement location="${junit.jar}"/> |
|
|
</path> |
|
|
|
|
|
<!-- Flatten test classpath into a platform-appropriate string --> |
|
|
<property name="test.classpath" refid="test.classpath"/> |
|
|
|
|
|
<!-- Turn the flattened test classpath into a javac argument --> |
|
|
<property name="test.javac.args" value='-Xbootclasspath/p:${test.classpath}'/> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Files excluded from emulation and dist-docs --> |
|
|
<patternset id="emulation.excludes"> |
|
64 |
<exclude name="java/util/Random.*"/> |
<exclude name="java/util/Random.*"/> |
65 |
<exclude name="sun/misc/Unsafe.*"/> |
<exclude name="sun/misc/Unsafe.*"/> |
66 |
</patternset> |
</patternset> |
67 |
|
|
68 |
|
<!-- Files excludes from emulation jar --> |
69 |
|
<patternset id="atomic.exclusion"> |
70 |
|
<exclude name="java/util/concurrent/atomic/AtomicBoolean*"/> |
71 |
|
<exclude name="java/util/concurrent/atomic/AtomicInteger*"/> |
72 |
|
<exclude name="java/util/concurrent/atomic/AtomicLong*"/> |
73 |
|
<exclude name="java/util/concurrent/atomic/AtomicReference*"/> |
74 |
|
</patternset> |
75 |
|
|
76 |
|
|
77 |
|
|
78 |
<!-- Main targets --> |
<!-- Main targets --> |
79 |
|
|
80 |
<target name="compile" |
<target name="compile" |
81 |
depends="init" |
depends="init, configure-compiler, prepare-src" |
82 |
description="Compiles main sources to build folder"> |
description="Compiles main sources to build folder"> |
83 |
|
|
84 |
|
<property name="prepare.src.dir" value="${src.dir}"/> |
85 |
|
|
86 |
<mkdir dir="${build.classes.dir}"/> |
<mkdir dir="${build.classes.dir}"/> |
87 |
|
|
88 |
<javac srcdir="${src.dir}" |
<!-- |
89 |
|
<echo>javac ${gjc.args}</echo> |
90 |
|
<echo>bootclasspath=${compile.bootclasspath}</echo> |
91 |
|
--> |
92 |
|
|
93 |
|
<javac srcdir="${prepare.src.dir}" |
94 |
destdir="${build.classes.dir}" |
destdir="${build.classes.dir}" |
95 |
debug="${build.debug}" |
debug="${build.debug}" |
96 |
debuglevel="${build.debuglevel}" |
debuglevel="${build.debuglevel}" |
98 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
99 |
fork="true"> |
fork="true"> |
100 |
|
|
101 |
<bootclasspath refid="javac.bootclasspath"/> |
<compilerarg line="${gjc.args}"/> |
102 |
<compilerarg line="${javac.args} ${build.warnings.option}"/> |
<bootclasspath refid="compile.bootclasspath"/> |
103 |
|
|
104 |
</javac> |
</javac> |
105 |
|
|
107 |
|
|
108 |
|
|
109 |
<target name="jar" |
<target name="jar" |
110 |
depends="native-jar, emulation-jar" |
depends="configure-emulation, init-jar, native-jar, emulation-jar" |
111 |
description="Builds library jar from compiled sources"/> |
description="Builds library jar from compiled sources"/> |
112 |
|
|
113 |
|
|
114 |
<target name="test" |
<target name="test" |
115 |
depends="init, check-junit, report-tests" |
depends="init, configure-tests, report-tests" |
116 |
description="Runs all tests (requires JUnit 3.8+ in ${ant.home}/lib)" /> |
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
117 |
|
|
118 |
|
|
119 |
<target name="checkstyle" |
<target name="checkstyle" |
160 |
source="${build.docsourcelevel}"> |
source="${build.docsourcelevel}"> |
161 |
|
|
162 |
<tag name="revised" description="Last revised:"/> |
<tag name="revised" description="Last revised:"/> |
163 |
<tag name="spec" description="Specified by:"/> |
<tag name="spec" description="Specified by:"/> |
164 |
<tag name="editor" description="Last edited by:"/> |
<tag name="editor" description="Last edited by:"/> |
165 |
<tag name="fixme" description="FIX ME:"/> |
<tag name="fixme" description="FIX ME:"/> |
166 |
|
|
167 |
<packageset dir="${build.filter.src.dir}"/> |
<packageset dir="${build.filter.src.dir}"/> |
168 |
|
|
169 |
</javadoc> |
</javadoc> |
171 |
</target> |
</target> |
172 |
|
|
173 |
|
|
|
<!-- |
|
|
# javac -s doesn't reliably generate compilable code. It generates |
|
|
# bridge methods (marked as "synthetic") that can have identical |
|
|
# signatures to existing methods except for the return value. |
|
|
--> |
|
174 |
<target name="strip" |
<target name="strip" |
175 |
depends="init"> |
depends="init, configure-compiler" |
176 |
|
description="Strip generics from java source (not working yet)"> |
177 |
|
|
178 |
<mkdir dir="${build.stripped.dir}"/> |
<mkdir dir="${build.stripped.dir}"/> |
179 |
|
|
180 |
|
<!-- |
181 |
|
# javac -s doesn't reliably generate compilable code. It generates |
182 |
|
# bridge methods (marked as "synthetic") that can have identical |
183 |
|
# signatures to existing methods except for the return value. |
184 |
|
--> |
185 |
<javac srcdir="${src.dir}" |
<javac srcdir="${src.dir}" |
186 |
destdir="${build.stripped.dir}" |
destdir="${build.stripped.dir}" |
187 |
debug="${build.debug}" |
debug="${build.debug}" |
190 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
191 |
fork="true"> |
fork="true"> |
192 |
|
|
193 |
<bootclasspath refid="javac.bootclasspath"/> |
<compilerarg line="${gjc.args} -s"/> |
194 |
<compilerarg line="${javac.args} ${build.warnings.option} -s"/> |
<bootclasspath refid="compile.bootclasspath"/> |
195 |
|
|
196 |
</javac> |
</javac> |
197 |
|
|
243 |
|
|
244 |
<!-- Internal targets --> |
<!-- Internal targets --> |
245 |
|
|
|
<target name="set-warnings-if" if="build.warnings"> |
|
|
|
|
|
<property name="build.warnings.option" value="-warnunchecked"/> |
|
|
|
|
|
</target> |
|
246 |
|
|
247 |
|
<target name="init"> |
|
<target name="set-warnings-unless" unless="build.warnings"> |
|
|
|
|
|
<property name="build.warnings.option" value=""/> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
<target name="init" |
|
|
depends="set-warnings-if, set-warnings-unless"> |
|
248 |
|
|
249 |
<!-- Version is kept in a separate file --> |
<!-- Version is kept in a separate file --> |
250 |
<loadfile property="version" srcFile="version.properties"/> |
<loadfile property="version" srcFile="version.properties"/> |
261 |
|
|
262 |
|
|
263 |
<target name="native-jar" |
<target name="native-jar" |
264 |
depends="compile, init-jar" |
depends="compile" |
265 |
unless="build.emulation"> |
unless="build.emulation.true"> |
266 |
|
|
267 |
<jar destfile="${product.jar}"> |
<jar destfile="${product.jar}"> |
268 |
<fileset dir="${build.classes.dir}"/> |
<fileset dir="${build.classes.dir}"/> |
271 |
</target> |
</target> |
272 |
|
|
273 |
|
|
|
<target name="base-jar" |
|
|
depends="compile, init-jar"> |
|
|
|
|
|
<jar destfile="${product.jar}"> |
|
|
<fileset dir="${build.classes.dir}"> |
|
|
<patternset refid="emulation.excludes"/> |
|
|
</fileset> |
|
|
</jar> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
274 |
<target name="compile-emulation" |
<target name="compile-emulation" |
275 |
depends="init" |
depends="init, configure-compiler" |
276 |
if="build.emulation"> |
if="build.emulation.true"> |
277 |
|
|
278 |
<mkdir dir="${build.emulation.dir}"/> |
<mkdir dir="${build.emulation.dir}"/> |
279 |
|
|
285 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
286 |
fork="true"> |
fork="true"> |
287 |
|
|
288 |
<bootclasspath refid="javac.bootclasspath"/> |
<compilerarg line="${gjc.args}"/> |
289 |
<compilerarg line="${javac.args} ${build.warnings.option}"/> |
<bootclasspath refid="compile.bootclasspath"/> |
290 |
|
|
291 |
</javac> |
</javac> |
292 |
|
|
294 |
|
|
295 |
|
|
296 |
<target name="emulation-jar" |
<target name="emulation-jar" |
297 |
depends="base-jar, compile-emulation" |
depends="compile-emulation" |
298 |
if="build.emulation"> |
if="build.emulation.true"> |
299 |
|
|
300 |
<jar destfile="${product.jar}" update="true" duplicate="add"> |
|
301 |
|
<jar destfile="${product.jar}" duplicate="add"> |
302 |
|
<fileset dir="${build.classes.dir}"> |
303 |
|
<patternset refid="atomic.exclusion"/> |
304 |
|
<patternset refid="unsafe.exclusion"/> |
305 |
|
</fileset> |
306 |
<fileset dir="${build.emulation.dir}"/> |
<fileset dir="${build.emulation.dir}"/> |
307 |
</jar> |
</jar> |
308 |
|
|
337 |
|
|
338 |
<copy todir="${build.filter.src.dir}"> |
<copy todir="${build.filter.src.dir}"> |
339 |
<fileset dir="${src.dir}"> |
<fileset dir="${src.dir}"> |
340 |
<patternset refid="emulation.excludes"/> |
<include name="**/*.html"/> |
341 |
|
</fileset> |
342 |
|
</copy> |
343 |
|
|
344 |
|
<!-- Not needed now, used for doccheck filtering: |
345 |
|
<property name="generic.declarations" |
346 |
|
value="public interface E {} public interface T {} public interface K {} public interface V {}" |
347 |
|
/> |
348 |
|
--> |
349 |
|
|
350 |
|
<copy todir="${build.filter.src.dir}"> |
351 |
|
<fileset dir="${src.dir}"> |
352 |
|
<exclude name="**/*.html"/> |
353 |
|
<patternset refid="unsafe.exclusion"/> |
354 |
</fileset> |
</fileset> |
355 |
<filterchain> |
<filterchain> |
356 |
|
|
357 |
|
<!-- |
358 |
|
# This filter gets rid of angle-bracketed type parameters |
359 |
|
# so that javadoc can run on the result. The following |
360 |
|
# heuristic seems to work: |
361 |
|
# |
362 |
|
# For all lines not starting with space(s)-asterisk-space(s), |
363 |
|
# replace <something> with a space, where there may be more |
364 |
|
# than one right angle bracket at the end, and "something" |
365 |
|
# must not contain parens or pipes. (This may need some |
366 |
|
# tweaking.) |
367 |
|
--> |
368 |
|
|
369 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
370 |
classpath="${build.ant.dir}"> |
classpath="${build.ant.dir}"> |
|
<!-- |
|
|
# These arguments are to get rid of angle-bracketed type |
|
|
# parameters so that javadoc can run on the result. The |
|
|
# following heuristic that seems to work: |
|
|
# |
|
|
# For all lines not starting with space(s)-asterisk-space(s), |
|
|
# replace <something> with a space, where there may be more |
|
|
# than one right angle bracket at the end, and "something" |
|
|
# must not contain parens or pipes. (This may need some |
|
|
# tweaking.) |
|
|
--> |
|
371 |
<param name="notmatching" value="^\s+\*\s.*$"/> |
<param name="notmatching" value="^\s+\*\s.*$"/> |
372 |
<param name="pattern" value="<[^|>()]+?>+"/> |
<param name="pattern" value="<[^|>()]+?>+"/> |
373 |
<param name="replacement" value=" "/> |
<param name="replacement" value=" "/> |
374 |
</filterreader> |
</filterreader> |
375 |
|
|
376 |
|
|
377 |
|
<!-- |
378 |
|
# This filter uncomments lines beginning with "//@" so that |
379 |
|
# javadoc can see imports that are needed to resolve links |
380 |
|
# but that shouldn't be in the compiled code. |
381 |
|
--> |
382 |
|
|
383 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
384 |
classpath="${build.ant.dir}"> |
classpath="${build.ant.dir}"> |
385 |
<!-- |
<param name="matching" value="^//@.*$"/> |
386 |
# These arguments are to uncomment lines beginning with |
<param name="pattern" value="^//@"/> |
|
# "//@" so that javadoc can see imports that are needed |
|
|
# to resolve links but that shouldn't be in the compiled |
|
|
# code. |
|
|
--> |
|
|
<param name="matching" value="^//@.*$"/> |
|
|
<param name="pattern" value="^//@"/> |
|
387 |
<param name="replacement" value=""/> |
<param name="replacement" value=""/> |
388 |
</filterreader> |
</filterreader> |
389 |
|
|
390 |
|
|
391 |
|
<!-- |
392 |
|
# The next two filters try to make the source look like |
393 |
|
# something that doccheck can process. The first removes |
394 |
|
# -source 1.4 assertions and the second adds in a bunch |
395 |
|
# of single letter public nested marker interfaces so that |
396 |
|
# the generic type parameters are recognized. |
397 |
|
# |
398 |
|
# Currently commented out because doccheck doesn't work. :-( |
399 |
|
--> |
400 |
|
|
401 |
|
<!-- |
402 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
403 |
|
classpath="${build.ant.dir}"> |
404 |
|
<param name="matching" value="^\s*assert[\s ].*$"/> |
405 |
|
<param name="pattern" value="assert"/> |
406 |
|
<param name="replacement" value="//assert"/> |
407 |
|
</filterreader> |
408 |
|
|
409 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
410 |
|
classpath="${build.ant.dir}"> |
411 |
|
<param name="matching" value="^(.*(class|interface|implements) .*|)\{.*$"/> |
412 |
|
<param name="pattern" value="$"/> |
413 |
|
<param name="replacement" value=" ${generic.declarations}"/> |
414 |
|
</filterreader> |
415 |
|
--> |
416 |
|
|
417 |
</filterchain> |
</filterchain> |
418 |
</copy> |
</copy> |
419 |
|
|
425 |
|
|
426 |
<mkdir dir="${build.testcases.dir}"/> |
<mkdir dir="${build.testcases.dir}"/> |
427 |
|
|
428 |
|
<!-- |
429 |
|
<echo>javac ${gjc.args}</echo> |
430 |
|
<echo>bootclasspath=${test.compile.bootclasspath}</echo> |
431 |
|
<echo>classpath="${test.classpath}"</echo> |
432 |
|
--> |
433 |
|
|
434 |
<javac srcdir="${test.src.dir}" |
<javac srcdir="${test.src.dir}" |
435 |
destdir="${build.testcases.dir}" |
destdir="${build.testcases.dir}" |
436 |
debug="${build.debug}" |
debug="${build.debug}" |
439 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
440 |
fork="true"> |
fork="true"> |
441 |
|
|
442 |
<bootclasspath refid="javac.bootclasspath"/> |
<compilerarg line="${gjc.args}"/> |
443 |
<compilerarg line="${javac.args} ${build.warnings.option}"/> |
<bootclasspath refid="test.compile.bootclasspath"/> |
444 |
<classpath refid="test.classpath"/> |
<classpath refid="test.classpath"/> |
445 |
|
|
446 |
</javac> |
</javac> |
447 |
|
|
463 |
dir="${build.reports.dir}" |
dir="${build.reports.dir}" |
464 |
fork="true"> |
fork="true"> |
465 |
|
|
466 |
<jvmarg value="${test.javac.args}"/> |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
467 |
|
|
468 |
<formatter type="xml"/> |
<formatter type="xml"/> |
469 |
|
|
504 |
</target> |
</target> |
505 |
|
|
506 |
|
|
507 |
<target name="check-junit"> |
<target name="configure-compiler"> |
508 |
|
|
509 |
|
<property name="gjc.version" |
510 |
|
value="2.0"/> |
511 |
|
|
512 |
|
<condition property="novariance.arg" value="-novariance"> |
513 |
|
<and> |
514 |
|
<equals arg1="${gjc.version}" arg2="2.0"/> |
515 |
|
<or> |
516 |
|
<not><isset property="gjc.novariance"/></not> |
517 |
|
<istrue value="${gjc.novariance}"/> |
518 |
|
</or> |
519 |
|
</and> |
520 |
|
</condition> |
521 |
|
|
522 |
|
<property name="novariance.arg" |
523 |
|
value=""/> |
524 |
|
|
525 |
|
<property name="gjc.dir" |
526 |
|
value="${lib.dir}/gjc"/> |
527 |
|
|
528 |
|
<property name="javac.jar" |
529 |
|
location="${gjc.dir}/${gjc.version}/javac.jar"/> |
530 |
|
|
531 |
|
<property name="collect.jar" |
532 |
|
location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/> |
533 |
|
|
534 |
|
|
535 |
|
<condition property="warnunchecked.arg" value="-warnunchecked"> |
536 |
|
<istrue value="${gjc.warnunchecked}"/> |
537 |
|
</condition> |
538 |
|
|
539 |
|
<property name="warnunchecked.arg" value=""/> |
540 |
|
|
541 |
|
<condition property="prepare.src.dir" value="${build.dir}/prepare-src"> |
542 |
|
<istrue value="${build.nothreads}"/> |
543 |
|
</condition> |
544 |
|
|
545 |
|
|
546 |
|
<!-- |
547 |
|
! Bootclasspath munging for source compilation. |
548 |
|
--> |
549 |
|
|
550 |
|
<path id="pre.bootclasspath"> |
551 |
|
<pathelement location="${javac.jar}"/> |
552 |
|
</path> |
553 |
|
|
554 |
|
<path id="compile.bootclasspath"> |
555 |
|
<pathelement location="${build.classes.dir}"/> |
556 |
|
<pathelement location="${collect.jar}"/> |
557 |
|
<pathelement location="${rt.jar}"/> |
558 |
|
</path> |
559 |
|
|
560 |
|
<!-- Flatten paths into platform-appropriate strings --> |
561 |
|
<property name="pre.bootclasspath" refid="pre.bootclasspath"/> |
562 |
|
<property name="compile.bootclasspath" refid="compile.bootclasspath"/> |
563 |
|
|
564 |
|
|
565 |
|
<!-- Common options in javac invocations --> |
566 |
|
<property name="gjc.args" |
567 |
|
value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}" |
568 |
|
/> |
569 |
|
|
570 |
|
</target> |
571 |
|
|
572 |
|
|
573 |
|
<target name="prepare-src" |
574 |
|
depends="configure-compiler" |
575 |
|
if="prepare.src.dir"> |
576 |
|
|
577 |
|
<mkdir dir="${prepare.src.dir}"/> |
578 |
|
<copy todir="${prepare.src.dir}"> |
579 |
|
<fileset dir="${src.dir}"> |
580 |
|
<exclude name="java/lang/**"/> |
581 |
|
</fileset> |
582 |
|
</copy> |
583 |
|
|
584 |
|
</target> |
585 |
|
|
586 |
|
|
587 |
|
<target name="configure-emulation"> |
588 |
|
|
589 |
|
<condition property="build.emulation.true"> |
590 |
|
<or> |
591 |
|
<and> |
592 |
|
<os family="windows"/> |
593 |
|
<not> |
594 |
|
<isset property="build.emulation"/> |
595 |
|
</not> |
596 |
|
</and> |
597 |
|
<istrue value="${build.emulation}"/> |
598 |
|
</or> |
599 |
|
</condition> |
600 |
|
|
601 |
|
</target> |
602 |
|
|
603 |
|
|
604 |
|
<target name="configure-tests" |
605 |
|
depends="configure-compiler"> |
606 |
|
|
607 |
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
608 |
<available property="junit.available" |
<available property="junit.available" |
611 |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
612 |
unless="junit.available"/> |
unless="junit.available"/> |
613 |
|
|
614 |
|
|
615 |
|
<!-- |
616 |
|
! Bootclasspath munging for testing, so JUnit can test our local |
617 |
|
! modifications to java.*. |
618 |
|
--> |
619 |
|
|
620 |
|
<path id="test.classpath"> |
621 |
|
<pathelement location="${product.jar}"/> |
622 |
|
<pathelement location="${build.testcases.dir}"/> |
623 |
|
<pathelement location="${junit.jar}"/> |
624 |
|
</path> |
625 |
|
|
626 |
|
<path id="test.compile.bootclasspath"> |
627 |
|
<pathelement location="${javac.jar}"/> |
628 |
|
<pathelement location="${collect.jar}"/> |
629 |
|
<pathelement location="${rt.jar}"/> |
630 |
|
</path> |
631 |
|
|
632 |
|
<path id="test.run.bootclasspath"> |
633 |
|
<pathelement location="${javac.jar}"/> |
634 |
|
<path refid="test.classpath"/> |
635 |
|
</path> |
636 |
|
|
637 |
|
<!-- Flatten test classpaths into platform-appropriate strings --> |
638 |
|
<property name="test.classpath" refid="test.classpath"/> |
639 |
|
<property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/> |
640 |
|
<property name="test.run.bootclasspath" refid="test.run.bootclasspath"/> |
641 |
|
|
642 |
</target> |
</target> |
643 |
|
|
644 |
|
|