1 |
|
<project name="jsr166" default="usage"> |
2 |
|
|
3 |
|
<description> |
4 |
< |
Build file for JSR-166 |
4 |
> |
------------------------------------------------------------------------------ |
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. |
7 |
< |
</description> |
7 |
> |
Usage: ant [target] |
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"> |
15 |
< |
<echo> |
12 |
< |
ant [target], where target is one of: |
13 |
< |
|
14 |
< |
usage (default) Prints this message |
15 |
< |
compile Compiles all sources to build folder |
16 |
< |
jar Builds library jar from compiled sources |
17 |
< |
test Runs all tests (requires JUnit 1.8 in ${ant.home}/lib) |
18 |
< |
docs Builds javadocs with custom tags to build folder |
19 |
< |
dist-docs Builds javadocs without custom tags to dist folder |
20 |
< |
dist Puts all distributable products in single hierarchy |
21 |
< |
|
22 |
< |
clean Removes all build products |
23 |
< |
dist-clean Removes all build and distribution products |
24 |
< |
|
25 |
< |
checkstyle Reports on style errors in Java source (verbose, mostly chaff) |
26 |
< |
doccheck Reports on javadoc style errors (not working yet) |
27 |
< |
</echo> |
14 |
> |
<target name="usage" description="Advises user to run with -projecthelp"> |
15 |
> |
<echo>Run "ant -projecthelp" for full usage information.</echo> |
16 |
|
</target> |
17 |
|
|
18 |
+ |
|
19 |
|
<!-- User-specific settings --> |
20 |
|
<property file="user.properties"/> |
21 |
|
|
33 |
– |
<!-- Set build.warnings in user.properties to turn on -warnunchecked --> |
34 |
– |
<!-- <property name="build.warnings" value=""/> --> |
35 |
– |
|
22 |
|
|
23 |
|
<!-- Compilation options --> |
24 |
|
<property name="build.sourcelevel" value="1.5"/> |
54 |
|
|
55 |
|
<!-- Jar locations --> |
56 |
|
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
71 |
– |
<property name="javac.jar" location="${lib.dir}/javac.jar"/> |
72 |
– |
<property name="collect.jar" location="${lib.dir}/collect.jar"/> |
57 |
|
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
58 |
|
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
59 |
|
|
60 |
|
|
77 |
– |
<!-- |
78 |
– |
! Bootclasspath munging for source compilation. |
79 |
– |
--> |
80 |
– |
|
81 |
– |
<path id="javac.bootclasspath.prepend"> |
82 |
– |
<!-- <pathelement location="${src.dir}"/> --> |
83 |
– |
<pathelement location="${javac.jar}"/> |
84 |
– |
</path> |
85 |
– |
|
86 |
– |
<path id="javac.bootclasspath"> |
87 |
– |
<!-- <pathelement location="${src.dir}"/> --> |
88 |
– |
<pathelement location="${collect.jar}"/> |
89 |
– |
<pathelement location="${rt.jar}"/> |
90 |
– |
</path> |
91 |
– |
|
92 |
– |
<!-- Flatten bootclasspath prefix into a platform-appropriate string --> |
93 |
– |
<property name="javac.bootclasspath.prepend" refid="javac.bootclasspath.prepend"/> |
94 |
– |
|
95 |
– |
<!-- Turn the flattened bootclasspath prefix into a javac argument --> |
96 |
– |
<property name="javac.args" value='-J-Xbootclasspath/p:${javac.bootclasspath.prepend}'/> |
97 |
– |
|
98 |
– |
|
99 |
– |
<!-- |
100 |
– |
! Bootclasspath munging for testing, so JUnit can test our local |
101 |
– |
! modifications to java.*. |
102 |
– |
--> |
103 |
– |
|
104 |
– |
<path id="test.classpath"> |
105 |
– |
<pathelement location="${product.jar}"/> |
106 |
– |
<pathelement location="${build.testcases.dir}"/> |
107 |
– |
<pathelement location="${junit.jar}"/> |
108 |
– |
</path> |
109 |
– |
|
110 |
– |
<!-- Flatten test classpath into a platform-appropriate string --> |
111 |
– |
<property name="test.classpath" refid="test.classpath"/> |
61 |
|
|
62 |
< |
<!-- Turn the flattened test classpath into a javac argument --> |
63 |
< |
<property name="test.javac.args" value='-Xbootclasspath/p:${test.classpath}'/> |
62 |
> |
<!-- Files excluded from emulation and dist-docs --> |
63 |
> |
<patternset id="emulation.excludes"> |
64 |
> |
<exclude name="java/util/Random.*"/> |
65 |
> |
<exclude name="sun/misc/Unsafe.*"/> |
66 |
> |
</patternset> |
67 |
|
|
68 |
|
|
69 |
|
|
70 |
|
<!-- Main targets --> |
71 |
|
|
72 |
< |
<target name="compile" depends="init" |
72 |
> |
<target name="compile" |
73 |
> |
depends="init, configure-compiler, prepare-src" |
74 |
|
description="Compiles main sources to build folder"> |
75 |
|
|
76 |
+ |
<property name="prepare.src.dir" value="${src.dir}"/> |
77 |
+ |
|
78 |
|
<mkdir dir="${build.classes.dir}"/> |
79 |
|
|
80 |
< |
<javac srcdir="${src.dir}" |
80 |
> |
<javac srcdir="${prepare.src.dir}" |
81 |
|
destdir="${build.classes.dir}" |
82 |
|
debug="${build.debug}" |
83 |
|
debuglevel="${build.debuglevel}" |
86 |
|
fork="true"> |
87 |
|
|
88 |
|
<bootclasspath refid="javac.bootclasspath"/> |
89 |
< |
<compilerarg line="${javac.args} ${build.warnings.option}"/> |
89 |
> |
<compilerarg line="${build.javac.args}"/> |
90 |
|
|
91 |
|
</javac> |
92 |
|
|
93 |
|
</target> |
94 |
|
|
95 |
|
|
96 |
< |
<target name="jar" depends="native-jar, emulation-jar"/> |
96 |
> |
<target name="jar" |
97 |
> |
depends="configure-emulation, init-jar, native-jar, emulation-jar" |
98 |
> |
description="Builds library jar from compiled sources"/> |
99 |
|
|
100 |
|
|
101 |
< |
<target name="test" depends="init, check-junit, report-tests" |
102 |
< |
description="Runs all tests (requires JUnit 3.8+ in ${ant.home}/lib)" |
103 |
< |
/> |
101 |
> |
<target name="test" |
102 |
> |
depends="init, configure-tests, report-tests" |
103 |
> |
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
104 |
|
|
105 |
|
|
106 |
< |
<target name="checkstyle" depends="filter-src" |
106 |
> |
<target name="checkstyle" |
107 |
> |
depends="filter-src" |
108 |
|
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
109 |
|
|
110 |
|
<taskdef resource="checkstyletask.properties" |
118 |
|
</target> |
119 |
|
|
120 |
|
|
121 |
< |
<target name="doccheck" depends="filter-src" |
121 |
> |
<target name="doccheck" |
122 |
> |
depends="filter-src" |
123 |
|
description="Reports on javadoc style errors (not working yet)"> |
124 |
|
|
125 |
|
<delete dir="${build.doccheck.dir}"/> |
134 |
|
</target> |
135 |
|
|
136 |
|
|
137 |
< |
<target name="docs" depends="filter-src" |
137 |
> |
<target name="docs" |
138 |
> |
depends="filter-src" |
139 |
|
description="Builds javadocs with custom tags to build folder"> |
140 |
|
|
141 |
|
<delete dir="${build.javadocs.dir}"/> |
147 |
|
source="${build.docsourcelevel}"> |
148 |
|
|
149 |
|
<tag name="revised" description="Last revised:"/> |
150 |
< |
<tag name="spec" description="Specified by:"/> |
151 |
< |
<tag name="editor" description="Last edited by:"/> |
152 |
< |
<tag name="fixme" description="FIX ME:"/> |
150 |
> |
<tag name="spec" description="Specified by:"/> |
151 |
> |
<tag name="editor" description="Last edited by:"/> |
152 |
> |
<tag name="fixme" description="FIX ME:"/> |
153 |
> |
|
154 |
|
<packageset dir="${build.filter.src.dir}"/> |
155 |
|
|
156 |
|
</javadoc> |
158 |
|
</target> |
159 |
|
|
160 |
|
|
161 |
< |
<!-- |
162 |
< |
# javac -s doesn't reliably generate compilable code. It generates |
163 |
< |
# bridge methods (marked as "synthetic") that can have identical |
203 |
< |
# signatures to existing methods except for the return value. |
204 |
< |
--> |
205 |
< |
<target name="strip" depends="init"> |
161 |
> |
<target name="strip" |
162 |
> |
depends="init, configure-compiler" |
163 |
> |
description="Strip generics from java source (not working yet)"> |
164 |
|
|
165 |
|
<mkdir dir="${build.stripped.dir}"/> |
166 |
|
|
167 |
+ |
<!-- |
168 |
+ |
# javac -s doesn't reliably generate compilable code. It generates |
169 |
+ |
# bridge methods (marked as "synthetic") that can have identical |
170 |
+ |
# signatures to existing methods except for the return value. |
171 |
+ |
--> |
172 |
|
<javac srcdir="${src.dir}" |
173 |
|
destdir="${build.stripped.dir}" |
174 |
|
debug="${build.debug}" |
178 |
|
fork="true"> |
179 |
|
|
180 |
|
<bootclasspath refid="javac.bootclasspath"/> |
181 |
< |
<compilerarg line="${javac.args} ${build.warnings.option} -s"/> |
181 |
> |
<compilerarg line="${build.javac.args} -s"/> |
182 |
|
|
183 |
|
</javac> |
184 |
|
|
185 |
|
</target> |
186 |
|
|
187 |
|
|
188 |
< |
<target name="dist" depends="init, dist-clean, dist-jar, dist-docs" |
188 |
> |
<target name="dist" |
189 |
> |
depends="init, dist-clean, dist-jar, dist-docs" |
190 |
|
description="Puts all distributable products in single hierarchy"/> |
191 |
|
|
192 |
|
|
208 |
|
</target> |
209 |
|
|
210 |
|
|
211 |
< |
<!-- Anthill targets --> |
212 |
< |
|
213 |
< |
<!-- Should really run the tests instead of just the jar target --> |
250 |
< |
<target name="anthill-build" depends="jar, test, docs, dist-docs"/> |
251 |
< |
|
252 |
< |
<target name="anthill-publish"> |
253 |
< |
<copy todir="${deployDir}/docs/private"> |
254 |
< |
<fileset dir="${build.javadocs.dir}"/> |
255 |
< |
</copy> |
256 |
< |
<copy todir="${deployDir}/docs/public"> |
257 |
< |
<fileset dir="${dist.javadocs.dir}"/> |
258 |
< |
</copy> |
259 |
< |
<copy tofile="${deployDir}/index.html" |
260 |
< |
file="${basedir}/etc/anthill-index.html"/> |
261 |
< |
<copy todir="${deployDir}/notes"> |
262 |
< |
<fileset dir="${basedir}/etc/notes"/> |
263 |
< |
</copy> |
264 |
< |
</target> |
211 |
> |
<target name="dist-docs" |
212 |
> |
depends="filter-src" |
213 |
> |
description="Builds javadocs without custom tags to dist folder"> |
214 |
|
|
215 |
+ |
<delete dir="${dist.javadocs.dir}"/> |
216 |
+ |
<mkdir dir="${dist.javadocs.dir}"/> |
217 |
|
|
218 |
< |
<!-- Internal targets --> |
218 |
> |
<javadoc destdir="${dist.javadocs.dir}" |
219 |
> |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
220 |
> |
overview="${src.dir}/intro.html" |
221 |
> |
source="${build.docsourcelevel}"> |
222 |
|
|
223 |
< |
<target name="set-warnings-if" if="build.warnings"> |
223 |
> |
<packageset dir="${build.filter.src.dir}"/> |
224 |
|
|
225 |
< |
<property name="build.warnings.option" value="-warnunchecked"/> |
225 |
> |
</javadoc> |
226 |
|
|
227 |
|
</target> |
228 |
|
|
229 |
|
|
276 |
– |
<target name="set-warnings-unless" unless="build.warnings"> |
277 |
– |
|
278 |
– |
<property name="build.warnings.option" value=""/> |
230 |
|
|
231 |
< |
</target> |
231 |
> |
<!-- Internal targets --> |
232 |
|
|
233 |
|
|
234 |
< |
<target name="init" depends="set-warnings-if, set-warnings-unless"> |
234 |
> |
<target name="init"> |
235 |
|
|
236 |
|
<!-- Version is kept in a separate file --> |
237 |
|
<loadfile property="version" srcFile="version.properties"/> |
240 |
|
</target> |
241 |
|
|
242 |
|
|
243 |
< |
<target name="native-jar" depends="compile" |
293 |
< |
description="Builds library jar from compiled sources"> |
243 |
> |
<target name="init-jar"> |
244 |
|
|
245 |
|
<mkdir dir="${build.lib.dir}"/> |
246 |
|
|
247 |
+ |
</target> |
248 |
+ |
|
249 |
+ |
|
250 |
+ |
<target name="native-jar" |
251 |
+ |
depends="compile" |
252 |
+ |
unless="build.emulation.true"> |
253 |
+ |
|
254 |
|
<jar destfile="${product.jar}"> |
255 |
|
<fileset dir="${build.classes.dir}"/> |
256 |
|
</jar> |
258 |
|
</target> |
259 |
|
|
260 |
|
|
261 |
< |
<target name="compile-emulation" depends="init" |
262 |
< |
if="build.emulation" |
263 |
< |
description="Compiles emulation sources to build folder"> |
261 |
> |
<target name="compile-emulation" |
262 |
> |
depends="init, configure-compiler" |
263 |
> |
if="build.emulation.true"> |
264 |
|
|
265 |
|
<mkdir dir="${build.emulation.dir}"/> |
266 |
|
|
273 |
|
fork="true"> |
274 |
|
|
275 |
|
<bootclasspath refid="javac.bootclasspath"/> |
276 |
< |
<compilerarg line="${javac.args} ${build.warnings.option}"/> |
276 |
> |
<compilerarg line="${build.javac.args}"/> |
277 |
|
|
278 |
|
</javac> |
279 |
|
|
280 |
|
</target> |
281 |
|
|
282 |
|
|
283 |
< |
<target name="emulation-jar" depends="native-jar, compile-emulation" |
284 |
< |
if="build.emulation"> |
283 |
> |
<target name="emulation-jar" |
284 |
> |
depends="compile-emulation" |
285 |
> |
if="build.emulation.true"> |
286 |
> |
|
287 |
|
|
288 |
< |
<jar destfile="${product.jar}" update="true" duplicate="add"> |
288 |
> |
<jar destfile="${product.jar}" duplicate="add"> |
289 |
> |
<fileset dir="${build.classes.dir}"> |
290 |
> |
<patternset refid="emulation.excludes"/> |
291 |
> |
</fileset> |
292 |
|
<fileset dir="${build.emulation.dir}"/> |
293 |
|
</jar> |
294 |
|
|
295 |
|
</target> |
296 |
|
|
297 |
|
|
298 |
< |
<target name="dist-jar" depends="clean, jar"> |
298 |
> |
<target name="dist-jar" |
299 |
> |
depends="clean, jar"> |
300 |
|
|
301 |
|
<copy file="${product.jar}" todir="${dist.dir}"/> |
302 |
|
|
303 |
|
</target> |
304 |
|
|
305 |
|
|
306 |
< |
<target name="dist-docs" depends="filter-src" |
307 |
< |
description="Builds javadocs without custom tags to dist folder"> |
345 |
< |
|
346 |
< |
<delete dir="${dist.javadocs.dir}"/> |
347 |
< |
<mkdir dir="${dist.javadocs.dir}"/> |
348 |
< |
|
349 |
< |
<javadoc destdir="${dist.javadocs.dir}" |
350 |
< |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
351 |
< |
overview="${src.dir}/intro.html" |
352 |
< |
source="${build.docsourcelevel}"> |
353 |
< |
|
354 |
< |
<packageset dir="${build.filter.src.dir}"/> |
355 |
< |
|
356 |
< |
</javadoc> |
357 |
< |
|
358 |
< |
</target> |
359 |
< |
|
360 |
< |
|
361 |
< |
<target name="compile-ant-filter" depends="init"> |
306 |
> |
<target name="compile-ant-filter" |
307 |
> |
depends="init"> |
308 |
|
|
309 |
|
<mkdir dir="${build.ant.dir}"/> |
310 |
|
|
316 |
|
</target> |
317 |
|
|
318 |
|
|
319 |
< |
<target name="filter-src" depends="compile-ant-filter"> |
319 |
> |
<target name="filter-src" |
320 |
> |
depends="compile-ant-filter"> |
321 |
|
|
322 |
|
<mkdir dir="${build.filter.src.dir}"/> |
323 |
|
|
324 |
|
<copy todir="${build.filter.src.dir}"> |
325 |
|
<fileset dir="${src.dir}"> |
326 |
< |
<include name="**/*.java"/> |
327 |
< |
<exclude name="**/Random.java"/> |
328 |
< |
<exclude name="**/Unsafe.java"/> |
326 |
> |
<include name="**/*.html"/> |
327 |
> |
</fileset> |
328 |
> |
</copy> |
329 |
> |
|
330 |
> |
<copy todir="${build.filter.src.dir}"> |
331 |
> |
<fileset dir="${src.dir}"> |
332 |
> |
<exclude name="**/*.html"/> |
333 |
> |
<patternset refid="emulation.excludes"/> |
334 |
|
</fileset> |
335 |
|
<filterchain> |
336 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
368 |
|
</target> |
369 |
|
|
370 |
|
|
371 |
< |
<target name="compile-tests" depends="jar"> |
371 |
> |
<target name="compile-tests" |
372 |
> |
depends="jar"> |
373 |
|
|
374 |
|
<mkdir dir="${build.testcases.dir}"/> |
375 |
|
|
381 |
|
source="${build.sourcelevel}" |
382 |
|
fork="true"> |
383 |
|
|
431 |
– |
<bootclasspath refid="javac.bootclasspath"/> |
432 |
– |
<compilerarg line="${javac.args} ${build.warnings.option}"/> |
384 |
|
<classpath refid="test.classpath"/> |
385 |
+ |
<bootclasspath refid="javac.bootclasspath"/> |
386 |
+ |
<compilerarg line="${build.javac.args}"/> |
387 |
|
|
388 |
|
</javac> |
389 |
|
|
390 |
|
</target> |
391 |
|
|
392 |
|
|
393 |
< |
<target name="run-tests" depends="compile-tests"> |
393 |
> |
<target name="run-tests" |
394 |
> |
depends="compile-tests"> |
395 |
|
|
396 |
|
<!-- May be overridden by user.properties --> |
397 |
|
<property name="testcase" value="*"/> |
405 |
|
dir="${build.reports.dir}" |
406 |
|
fork="true"> |
407 |
|
|
408 |
< |
<jvmarg value="${test.javac.args}"/> |
408 |
> |
<jvmarg value="${test.bootclasspath.arg}"/> |
409 |
|
|
410 |
|
<formatter type="xml"/> |
411 |
|
|
420 |
|
</target> |
421 |
|
|
422 |
|
|
423 |
< |
<target name="report-tests" depends="run-tests"> |
423 |
> |
<target name="report-tests" |
424 |
> |
depends="run-tests"> |
425 |
> |
|
426 |
|
<!-- Sets junit.report.format to frames if Xalan is present, |
427 |
|
otherwise sets it to noframes. --> |
428 |
|
<available property="junit.report.format" |
442 |
|
</junitreport> |
443 |
|
|
444 |
|
<fail message="Test Cases Failed" if="junit.failed"/> |
445 |
+ |
|
446 |
|
</target> |
447 |
|
|
448 |
|
|
449 |
< |
<target name="check-junit"> |
450 |
< |
<!-- FIXME: this test isn't specific enough --> |
449 |
> |
<target name="configure-compiler"> |
450 |
> |
|
451 |
> |
<property name="gjc.version" |
452 |
> |
value="2.0"/> |
453 |
> |
|
454 |
> |
<condition property="build.novariance" value="-novariance"> |
455 |
> |
<and> |
456 |
> |
<equals arg1="${gjc.version}" arg2="2.0"/> |
457 |
> |
<or> |
458 |
> |
<not><isset property="gjc.novariance"/></not> |
459 |
> |
<istrue value="${gjc.novariance}"/> |
460 |
> |
</or> |
461 |
> |
</and> |
462 |
> |
</condition> |
463 |
> |
|
464 |
> |
<property name="build.novariance" |
465 |
> |
value=""/> |
466 |
> |
|
467 |
> |
<property name="gjc.dir" |
468 |
> |
value="${lib.dir}/gjc"/> |
469 |
> |
|
470 |
> |
<property name="javac.jar" |
471 |
> |
location="${gjc.dir}/${gjc.version}/javac.jar"/> |
472 |
> |
|
473 |
> |
<property name="collect.jar" |
474 |
> |
location="${gjc.dir}/${gjc.version}/collect${build.novariance}.jar"/> |
475 |
> |
|
476 |
> |
|
477 |
> |
<condition property="build.warnunchecked" value="-warnunchecked"> |
478 |
> |
<istrue value="${gjc.warnunchecked}"/> |
479 |
> |
</condition> |
480 |
> |
|
481 |
> |
<property name="build.warnunchecked" value=""/> |
482 |
> |
|
483 |
> |
<condition property="prepare.src.dir" value="${build.dir}/prepare-src"> |
484 |
> |
<istrue value="${build.nothreads}"/> |
485 |
> |
</condition> |
486 |
> |
|
487 |
> |
|
488 |
> |
<!-- |
489 |
> |
! Bootclasspath munging for source compilation. |
490 |
> |
--> |
491 |
> |
|
492 |
> |
<path id="javac.bootclasspath.prefix"> |
493 |
> |
<!-- <pathelement location="${src.dir}"/> --> |
494 |
> |
<pathelement location="${javac.jar}"/> |
495 |
> |
</path> |
496 |
> |
|
497 |
> |
<path id="javac.bootclasspath"> |
498 |
> |
<!-- <pathelement location="${src.dir}"/> --> |
499 |
> |
<pathelement location="${collect.jar}"/> |
500 |
> |
<pathelement location="${rt.jar}"/> |
501 |
> |
</path> |
502 |
> |
|
503 |
> |
<!-- Flatten bootclasspath prefix into a platform-appropriate string --> |
504 |
> |
<property name="javac.bootclasspath.prefix" |
505 |
> |
refid="javac.bootclasspath.prefix"/> |
506 |
> |
|
507 |
> |
<!-- Turn the flattened bootclasspath prefix into a javac argument --> |
508 |
> |
<property name="build.bootclasspath.arg" |
509 |
> |
value='-J-Xbootclasspath/p:${javac.bootclasspath.prefix}'/> |
510 |
> |
|
511 |
> |
<!-- Flatten bootclasspath for trace message --> |
512 |
> |
<property name="javac.bootclasspath" |
513 |
> |
refid="javac.bootclasspath"/> |
514 |
> |
|
515 |
> |
<!-- Common options in javac invocations --> |
516 |
> |
<property name="build.javac.args" |
517 |
> |
value="${build.bootclasspath.arg} ${build.warnunchecked} ${build.novariance}"/> |
518 |
> |
|
519 |
> |
<echo>javac ${build.javac.args}</echo> |
520 |
> |
<echo>bootclasspath=${javac.bootclasspath}</echo> |
521 |
> |
|
522 |
> |
</target> |
523 |
> |
|
524 |
> |
|
525 |
> |
<target name="prepare-src" |
526 |
> |
depends="configure-compiler" |
527 |
> |
if="prepare.src.dir"> |
528 |
> |
|
529 |
> |
<mkdir dir="${prepare.src.dir}"/> |
530 |
> |
<copy todir="${prepare.src.dir}"> |
531 |
> |
<fileset dir="${src.dir}"> |
532 |
> |
<exclude name="java/lang/**"/> |
533 |
> |
</fileset> |
534 |
> |
</copy> |
535 |
> |
|
536 |
> |
</target> |
537 |
> |
|
538 |
> |
|
539 |
> |
<target name="configure-emulation"> |
540 |
> |
|
541 |
> |
<condition property="build.emulation.true"> |
542 |
> |
<or> |
543 |
> |
<and> |
544 |
> |
<os family="windows"/> |
545 |
> |
<not> |
546 |
> |
<isset property="build.emulation"/> |
547 |
> |
</not> |
548 |
> |
</and> |
549 |
> |
<istrue value="${build.emulation}"/> |
550 |
> |
</or> |
551 |
> |
</condition> |
552 |
> |
|
553 |
> |
</target> |
554 |
> |
|
555 |
> |
|
556 |
> |
<target name="configure-tests"> |
557 |
> |
|
558 |
> |
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
559 |
|
<available property="junit.available" |
560 |
< |
classname="junit.framework.TestCase"/> |
561 |
< |
<fail message="Need JUnit 3.8 to run tests" unless="junit.available"/> |
560 |
> |
classname="junit.framework.Protectable"/> |
561 |
> |
|
562 |
> |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
563 |
> |
unless="junit.available"/> |
564 |
> |
|
565 |
> |
|
566 |
> |
<!-- |
567 |
> |
! Bootclasspath munging for testing, so JUnit can test our local |
568 |
> |
! modifications to java.*. |
569 |
> |
--> |
570 |
> |
|
571 |
> |
<path id="test.classpath"> |
572 |
> |
<pathelement location="${product.jar}"/> |
573 |
> |
<pathelement location="${build.testcases.dir}"/> |
574 |
> |
<pathelement location="${junit.jar}"/> |
575 |
> |
</path> |
576 |
> |
|
577 |
> |
<!-- Flatten test classpath into a platform-appropriate string --> |
578 |
> |
<property name="test.classpath" refid="test.classpath"/> |
579 |
> |
|
580 |
> |
<!-- Turn the flattened test classpath into a javac argument --> |
581 |
> |
<property name="test.bootclasspath.arg" |
582 |
> |
value='-Xbootclasspath/p:${test.classpath}'/> |
583 |
> |
|
584 |
> |
</target> |
585 |
> |
|
586 |
> |
|
587 |
> |
|
588 |
> |
<!-- Anthill targets --> |
589 |
> |
|
590 |
> |
<target name="anthill-build" |
591 |
> |
depends="jar, test, docs, dist-docs"/> |
592 |
> |
|
593 |
> |
<target name="anthill-publish"> |
594 |
> |
|
595 |
> |
<copy todir="${deployDir}/docs/private"> |
596 |
> |
<fileset dir="${build.javadocs.dir}"/> |
597 |
> |
</copy> |
598 |
> |
|
599 |
> |
<copy todir="${deployDir}/docs/public"> |
600 |
> |
<fileset dir="${dist.javadocs.dir}"/> |
601 |
> |
</copy> |
602 |
> |
|
603 |
> |
<copy tofile="${deployDir}/index.html" |
604 |
> |
file="${basedir}/etc/anthill-index.html"/> |
605 |
> |
|
606 |
> |
<copy todir="${deployDir}/notes"> |
607 |
> |
<fileset dir="${basedir}/etc/notes"/> |
608 |
> |
</copy> |
609 |
> |
|
610 |
|
</target> |
611 |
|
|
612 |
|
|