ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/build.xml
(Generate patch)

Comparing jsr166/build.xml (file contents):
Revision 1.27 by tim, Wed May 28 00:33:17 2003 UTC vs.
Revision 1.37 by tim, Fri May 30 03:24:18 2003 UTC

# Line 1 | Line 1
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"/>
# Line 68 | Line 54 | ant [target], where target is one of:
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 > <!--
81 >    <echo>javac ${gjc.args}</echo>
82 >    <echo>bootclasspath=${compile.bootclasspath}</echo>
83 > -->
84 >
85 >    <javac srcdir="${prepare.src.dir}"
86            destdir="${build.classes.dir}"
87              debug="${build.debug}"
88         debuglevel="${build.debuglevel}"
# Line 130 | Line 90 | ant [target], where target is one of:
90             source="${build.sourcelevel}"
91               fork="true">
92  
93 <      <bootclasspath refid="javac.bootclasspath"/>
94 <      <compilerarg line="${javac.args} ${build.warnings.option}"/>
93 >      <compilerarg    line="${gjc.args}"/>
94 >      <bootclasspath refid="compile.bootclasspath"/>
95  
96      </javac>
97  
98    </target>
99  
100  
101 <  <target name="jar" depends="native-jar, emulation-jar"/>
101 >  <target name="jar"
102 >          depends="configure-emulation, init-jar, native-jar, emulation-jar"
103 >          description="Builds library jar from compiled sources"/>
104  
105  
106 <  <target name="test" depends="init, check-junit, report-tests"
107 <          description="Runs all tests (requires JUnit 3.8+ in ${ant.home}/lib)"
108 <  />
106 >  <target name="test"
107 >          depends="init, configure-tests, report-tests"
108 >          description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
109  
110  
111 <  <target name="checkstyle" depends="filter-src"
111 >  <target name="checkstyle"
112 >          depends="filter-src"
113            description="Reports on style errors in Java source (verbose, mostly chaff)">
114  
115      <taskdef resource="checkstyletask.properties"
# Line 160 | Line 123 | ant [target], where target is one of:
123    </target>
124  
125  
126 <  <target name="doccheck" depends="filter-src"
126 >  <target name="doccheck"
127 >          depends="filter-src"
128            description="Reports on javadoc style errors (not working yet)">
129  
130      <delete dir="${build.doccheck.dir}"/>
# Line 175 | Line 139 | ant [target], where target is one of:
139    </target>
140  
141  
142 <  <target name="docs" depends="filter-src"
142 >  <target name="docs"
143 >          depends="filter-src"
144            description="Builds javadocs with custom tags to build folder">
145  
146      <delete dir="${build.javadocs.dir}"/>
# Line 187 | Line 152 | ant [target], where target is one of:
152                source="${build.docsourcelevel}">
153  
154        <tag name="revised" description="Last revised:"/>
155 <      <tag name="spec" description="Specified by:"/>
156 <      <tag name="editor" description="Last edited by:"/>
157 <      <tag name="fixme" description="FIX ME:"/>
155 >      <tag name="spec"    description="Specified by:"/>
156 >      <tag name="editor"  description="Last edited by:"/>
157 >      <tag name="fixme"   description="FIX ME:"/>
158 >
159        <packageset dir="${build.filter.src.dir}"/>
160  
161      </javadoc>
# Line 197 | Line 163 | ant [target], where target is one of:
163    </target>
164  
165  
166 <  <!--
167 <   # javac -s doesn't reliably generate compilable code. It generates
168 <   # 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">
166 >  <target name="strip"
167 >          depends="init, configure-compiler"
168 >          description="Strip generics from java source (not working yet)">
169  
170      <mkdir dir="${build.stripped.dir}"/>
171  
172 +    <!--
173 +     # javac -s doesn't reliably generate compilable code. It generates
174 +     # bridge methods (marked as "synthetic") that can have identical
175 +     # signatures to existing methods except for the return value.
176 +     -->
177      <javac srcdir="${src.dir}"
178            destdir="${build.stripped.dir}"
179              debug="${build.debug}"
# Line 214 | Line 182 | ant [target], where target is one of:
182             source="${build.sourcelevel}"
183               fork="true">
184  
185 <      <bootclasspath refid="javac.bootclasspath"/>
186 <      <compilerarg line="${javac.args} ${build.warnings.option} -s"/>
185 >      <compilerarg    line="${gjc.args} -s"/>
186 >      <bootclasspath refid="compile.bootclasspath"/>
187  
188      </javac>
189  
190    </target>
191  
192  
193 <  <target name="dist" depends="init, dist-clean, dist-jar, dist-docs"
193 >  <target name="dist"
194 >          depends="init, dist-clean, dist-jar, dist-docs"
195            description="Puts all distributable products in single hierarchy"/>
196  
197  
# Line 244 | Line 213 | ant [target], where target is one of:
213    </target>
214  
215  
216 <  <!-- Anthill targets -->
217 <
218 <  <!-- 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>
216 >  <target name="dist-docs"
217 >          depends="filter-src"
218 >          description="Builds javadocs without custom tags to dist folder">
219  
220 +    <delete dir="${dist.javadocs.dir}"/>
221 +    <mkdir dir="${dist.javadocs.dir}"/>
222  
223 <  <!-- Internal targets -->
223 >    <javadoc destdir="${dist.javadocs.dir}"
224 >                link="http://java.sun.com/j2se/1.4.1/docs/api"
225 >            overview="${src.dir}/intro.html"
226 >              source="${build.docsourcelevel}">
227  
228 <  <target name="set-warnings-if" if="build.warnings">
228 >      <packageset dir="${build.filter.src.dir}"/>
229  
230 <    <property name="build.warnings.option" value="-warnunchecked"/>
230 >    </javadoc>
231  
232    </target>
233  
234  
276  <target name="set-warnings-unless" unless="build.warnings">
277
278    <property name="build.warnings.option" value=""/>
235  
236 <  </target>
236 >  <!-- Internal targets -->
237  
238  
239 <  <target name="init" depends="set-warnings-if, set-warnings-unless">
239 >  <target name="init">
240  
241      <!-- Version is kept in a separate file -->
242      <loadfile property="version" srcFile="version.properties"/>
# Line 289 | Line 245 | ant [target], where target is one of:
245    </target>
246  
247  
248 <  <target name="native-jar" depends="compile"
293 <          description="Builds library jar from compiled sources">
248 >  <target name="init-jar">
249  
250      <mkdir dir="${build.lib.dir}"/>
251  
252 +  </target>
253 +
254 +
255 +  <target name="native-jar"
256 +          depends="compile"
257 +          unless="build.emulation.true">
258 +
259      <jar destfile="${product.jar}">
260        <fileset dir="${build.classes.dir}"/>
261      </jar>
# Line 301 | Line 263 | ant [target], where target is one of:
263    </target>
264  
265  
266 <  <target name="compile-emulation" depends="init"
267 <          if="build.emulation"
268 <          description="Compiles emulation sources to build folder">
266 >  <target name="compile-emulation"
267 >          depends="init, configure-compiler"
268 >          if="build.emulation.true">
269  
270      <mkdir dir="${build.emulation.dir}"/>
271  
# Line 315 | Line 277 | ant [target], where target is one of:
277             source="${build.sourcelevel}"
278               fork="true">
279  
280 <      <bootclasspath refid="javac.bootclasspath"/>
281 <      <compilerarg line="${javac.args} ${build.warnings.option}"/>
280 >      <compilerarg    line="${gjc.args}"/>
281 >      <bootclasspath refid="compile.bootclasspath"/>
282  
283      </javac>
284  
285    </target>
286  
287  
288 <  <target name="emulation-jar" depends="native-jar, compile-emulation"
289 <          if="build.emulation">
288 >  <target name="emulation-jar"
289 >          depends="compile-emulation"
290 >          if="build.emulation.true">
291 >
292  
293 <    <jar destfile="${product.jar}" update="true" duplicate="add">
293 >    <jar destfile="${product.jar}" duplicate="add">
294 >      <fileset dir="${build.classes.dir}">
295 >        <patternset refid="emulation.excludes"/>
296 >      </fileset>
297        <fileset dir="${build.emulation.dir}"/>
298      </jar>
299  
300    </target>
301  
302  
303 <  <target name="dist-jar" depends="clean, jar">
303 >  <target name="dist-jar"
304 >          depends="clean, jar">
305  
306      <copy file="${product.jar}" todir="${dist.dir}"/>
307  
308    </target>
309  
310  
311 <  <target name="dist-docs" depends="filter-src"
312 <          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">
311 >  <target name="compile-ant-filter"
312 >          depends="init">
313  
314      <mkdir dir="${build.ant.dir}"/>
315  
# Line 370 | Line 321 | ant [target], where target is one of:
321    </target>
322  
323  
324 <  <target name="filter-src" depends="compile-ant-filter">
324 >  <target name="filter-src"
325 >          depends="compile-ant-filter">
326  
327      <mkdir dir="${build.filter.src.dir}"/>
328  
329      <copy todir="${build.filter.src.dir}">
330        <fileset dir="${src.dir}">
331 <        <include name="**/*.java"/>
332 <        <exclude name="**/Random.java"/>
333 <        <exclude name="**/Unsafe.java"/>
331 >        <include name="**/*.html"/>
332 >      </fileset>
333 >    </copy>
334 >
335 >    <!-- Not needed now, used for doccheck filtering:
336 >    <property name="generic.declarations"
337 >             value="public interface E {} public interface T {} public interface K {} public interface V {}"
338 >    />
339 >    -->
340 >
341 >    <copy todir="${build.filter.src.dir}">
342 >      <fileset dir="${src.dir}">
343 >        <exclude name="**/*.html"/>
344 >        <patternset refid="emulation.excludes"/>
345        </fileset>
346        <filterchain>
347 +
348 +        <!--
349 +         # This filter gets rid of angle-bracketed type parameters
350 +         # so that javadoc can run on the result. The following
351 +         # heuristic seems to work:
352 +         #
353 +         # For all lines not starting with space(s)-asterisk-space(s),
354 +         #   replace <something> with a space, where there may be more
355 +         #   than one right angle bracket at the end, and "something"
356 +         #   must not contain parens or pipes. (This may need some
357 +         #   tweaking.)
358 +         -->
359 +
360          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
361                        classpath="${build.ant.dir}">
386          <!--
387           # These arguments are to get rid of angle-bracketed type
388           # parameters so that javadoc can run on the result. The
389           # following heuristic that seems to work:
390           #
391           # For all lines not starting with space(s)-asterisk-space(s),
392           #   replace <something> with a space, where there may be more
393           #   than one right angle bracket at the end, and "something"
394           #   must not contain parens or pipes. (This may need some
395           #   tweaking.)
396           -->
362            <param name="notmatching" value="^\s+\*\s.*$"/>
363 <          <param name="pattern" value="&lt;[^|>()]+?>+"/>
363 >          <param name="pattern"     value="&lt;[^|>()]+?>+"/>
364            <param name="replacement" value=" "/>
365          </filterreader>
366 +
367 +
368 +        <!--
369 +         # This filter uncomments lines beginning with "//@" so that
370 +         # javadoc can see imports that are needed to resolve links
371 +         # but that shouldn't be in the compiled code.
372 +         -->
373 +
374          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
375                        classpath="${build.ant.dir}">
376 <          <!--
377 <           # These arguments are to uncomment lines beginning with
405 <           # "//@" so that javadoc can see imports that are needed
406 <           # to resolve links but that shouldn't be in the compiled
407 <           # code.
408 <           -->
409 <          <param name="matching" value="^//@.*$"/>
410 <          <param name="pattern" value="^//@"/>
376 >          <param name="matching"    value="^//@.*$"/>
377 >          <param name="pattern"     value="^//@"/>
378            <param name="replacement" value=""/>
379          </filterreader>
380 +
381 +
382 +        <!--
383 +         # The next two filters try to make the source look like
384 +         # something that doccheck can process. The first removes
385 +         # -source 1.4 assertions and the second adds in a bunch
386 +         # of single letter public nested marker interfaces so that
387 +         # the generic type parameters are recognized.
388 +         #
389 +         # Currently commented out because doccheck doesn't work. :-(
390 +         -->
391 +
392 +        <!--
393 +        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
394 +                      classpath="${build.ant.dir}">
395 +          <param name="matching"    value="^\s*assert[\s ].*$"/>
396 +          <param name="pattern"     value="assert"/>
397 +          <param name="replacement" value="//assert"/>
398 +        </filterreader>
399 +
400 +        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
401 +                      classpath="${build.ant.dir}">
402 +          <param name="matching"    value="^(.*(class|interface|implements) .*|)\{.*$"/>
403 +          <param name="pattern"     value="$"/>
404 +          <param name="replacement" value=" ${generic.declarations}"/>
405 +        </filterreader>
406 +        -->
407 +
408        </filterchain>
409      </copy>
410  
411    </target>
412  
413  
414 <  <target name="compile-tests" depends="jar">
414 >  <target name="compile-tests"
415 >          depends="jar">
416  
417      <mkdir dir="${build.testcases.dir}"/>
418  
419 + <!--
420 +    <echo>javac ${gjc.args}</echo>
421 +    <echo>bootclasspath=${test.compile.bootclasspath}</echo>
422 +    <echo>classpath="${test.classpath}"</echo>
423 + -->
424 +
425      <javac srcdir="${test.src.dir}"
426            destdir="${build.testcases.dir}"
427              debug="${build.debug}"
# Line 428 | Line 430 | ant [target], where target is one of:
430             source="${build.sourcelevel}"
431               fork="true">
432  
433 <      <bootclasspath refid="javac.bootclasspath"/>
434 <      <compilerarg line="${javac.args} ${build.warnings.option}"/>
435 <      <classpath refid="test.classpath"/>
433 >      <compilerarg    line="${gjc.args}"/>
434 >      <bootclasspath refid="test.compile.bootclasspath"/>
435 >      <classpath     refid="test.classpath"/>
436  
437      </javac>
438  
439    </target>
440  
441  
442 <  <target name="run-tests" depends="compile-tests">
442 >  <target name="run-tests"
443 >          depends="compile-tests">
444  
445      <!-- May be overridden by user.properties -->
446      <property name="testcase" value="*"/>
# Line 451 | Line 454 | ant [target], where target is one of:
454                      dir="${build.reports.dir}"
455                     fork="true">
456  
457 <      <jvmarg value="${test.javac.args}"/>
457 >      <jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/>
458  
459        <formatter type="xml"/>
460  
# Line 466 | Line 469 | ant [target], where target is one of:
469    </target>
470  
471  
472 <  <target name="report-tests" depends="run-tests">
472 >  <target name="report-tests"
473 >          depends="run-tests">
474 >
475      <!-- Sets junit.report.format to frames if Xalan is present,
476           otherwise sets it to noframes. -->
477      <available property="junit.report.format"
# Line 486 | Line 491 | ant [target], where target is one of:
491      </junitreport>
492  
493      <fail message="Test Cases Failed" if="junit.failed"/>
494 +
495 +  </target>
496 +
497 +
498 +  <target name="configure-compiler">
499 +
500 +    <property name="gjc.version"
501 +             value="2.0"/>
502 +
503 +    <condition property="novariance.arg" value="-novariance">
504 +      <and>
505 +        <equals arg1="${gjc.version}" arg2="2.0"/>
506 +        <or>
507 +          <not><isset property="gjc.novariance"/></not>
508 +          <istrue value="${gjc.novariance}"/>
509 +        </or>
510 +      </and>
511 +    </condition>
512 +
513 +    <property name="novariance.arg"
514 +             value=""/>
515 +
516 +    <property name="gjc.dir"
517 +             value="${lib.dir}/gjc"/>
518 +
519 +    <property name="javac.jar"
520 +          location="${gjc.dir}/${gjc.version}/javac.jar"/>
521 +
522 +    <property name="collect.jar"
523 +          location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/>
524 +
525 +
526 +    <condition property="warnunchecked.arg" value="-warnunchecked">
527 +      <istrue value="${gjc.warnunchecked}"/>
528 +    </condition>
529 +
530 +    <property name="warnunchecked.arg" value=""/>
531 +
532 +    <condition property="prepare.src.dir" value="${build.dir}/prepare-src">
533 +      <istrue value="${build.nothreads}"/>
534 +    </condition>
535 +
536 +
537 +    <!--
538 +     ! Bootclasspath munging for source compilation.
539 +     -->
540 +
541 +    <path id="pre.bootclasspath">
542 +      <!-- <pathelement location="${src.dir}"/> -->
543 +      <pathelement location="${javac.jar}"/>
544 +    </path>
545 +
546 +    <path id="compile.bootclasspath">
547 +      <!-- <pathelement location="${src.dir}"/> -->
548 +      <pathelement location="${collect.jar}"/>
549 +      <pathelement location="${rt.jar}"/>
550 +    </path>
551 +
552 +    <!-- Flatten paths into platform-appropriate strings -->
553 +    <property name="pre.bootclasspath"     refid="pre.bootclasspath"/>
554 +    <property name="compile.bootclasspath" refid="compile.bootclasspath"/>
555 +
556 +
557 +    <!-- Common options in javac invocations -->
558 +    <property name="gjc.args"
559 +             value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}"
560 +    />
561 +
562    </target>
563  
564  
565 <  <target name="check-junit">
566 <    <!-- FIXME: this test isn't specific enough -->
565 >  <target name="prepare-src"
566 >          depends="configure-compiler"
567 >          if="prepare.src.dir">
568 >
569 >    <mkdir dir="${prepare.src.dir}"/>
570 >    <copy todir="${prepare.src.dir}">
571 >      <fileset dir="${src.dir}">
572 >        <exclude name="java/lang/**"/>
573 >      </fileset>
574 >    </copy>
575 >
576 >  </target>
577 >
578 >
579 >  <target name="configure-emulation">
580 >
581 >    <condition property="build.emulation.true">
582 >      <or>
583 >        <and>
584 >          <os family="windows"/>
585 >          <not>
586 >            <isset property="build.emulation"/>
587 >          </not>
588 >        </and>
589 >        <istrue value="${build.emulation}"/>
590 >      </or>
591 >    </condition>
592 >
593 >  </target>
594 >
595 >
596 >  <target name="configure-tests"
597 >       depends="configure-compiler">
598 >
599 >    <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
600      <available property="junit.available"
601 <               classname="junit.framework.TestCase"/>
602 <    <fail message="Need JUnit 3.8 to run tests" unless="junit.available"/>
601 >               classname="junit.framework.Protectable"/>
602 >
603 >    <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
604 >          unless="junit.available"/>
605 >
606 >
607 >    <!--
608 >     ! Bootclasspath munging for testing, so JUnit can test our local
609 >     ! modifications to java.*.
610 >     -->
611 >
612 >    <path id="test.classpath">
613 >      <pathelement location="${product.jar}"/>
614 >      <pathelement location="${build.testcases.dir}"/>
615 >      <pathelement location="${junit.jar}"/>
616 >    </path>
617 >
618 >    <path id="test.compile.bootclasspath">
619 >      <pathelement location="${javac.jar}"/>
620 >      <pathelement location="${collect.jar}"/>
621 >      <pathelement location="${rt.jar}"/>
622 >    </path>
623 >
624 >    <path id="test.run.bootclasspath">
625 >      <pathelement location="${javac.jar}"/>
626 >      <path refid="test.classpath"/>
627 >    </path>
628 >
629 >    <!-- Flatten test classpaths into platform-appropriate strings -->
630 >    <property name="test.classpath"             refid="test.classpath"/>
631 >    <property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/>
632 >    <property name="test.run.bootclasspath"     refid="test.run.bootclasspath"/>
633 >
634 >  </target>
635 >
636 >
637 >
638 >  <!-- Anthill targets -->
639 >
640 >  <target name="anthill-build"
641 >          depends="jar, test, docs, dist-docs"/>
642 >
643 >  <target name="anthill-publish">
644 >
645 >    <copy todir="${deployDir}/docs/private">
646 >      <fileset dir="${build.javadocs.dir}"/>
647 >    </copy>
648 >
649 >    <copy todir="${deployDir}/docs/public">
650 >      <fileset dir="${dist.javadocs.dir}"/>
651 >    </copy>
652 >
653 >    <copy tofile="${deployDir}/index.html"
654 >          file="${basedir}/etc/anthill-index.html"/>
655 >
656 >    <copy todir="${deployDir}/notes">
657 >      <fileset dir="${basedir}/etc/notes"/>
658 >    </copy>
659 >
660    </target>
661  
662  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines