[cvs] / jsr166 / build.xml Repository:
ViewVC logotype

Diff of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.23, Sat May 17 21:20:50 2003 UTC revision 1.33, Thu May 29 12:54:10 2003 UTC
# Line 1  Line 1 
1  <project name="jsr166" default="usage">  <project name="jsr166" default="usage">
2    
3    <description>    <description>
4    ------------------------------------------------------------------------------
5      Build file for JSR-166      Build file for JSR-166
6    
7      JUnit 1.8 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 -->
20    <property file="user.properties"/>    <property file="user.properties"/>
21    <property name="testcase" value="*"/>  
22    
23    <!-- Compilation options -->    <!-- Compilation options -->
24    <property name="build.sourcelevel"    value="1.5"/>    <property name="build.sourcelevel"    value="1.5"/>
25      <property name="build.docsourcelevel" value="1.4"/>
26    <property name="build.debug"          value="true"/>    <property name="build.debug"          value="true"/>
27    <property name="build.debuglevel"     value="source,lines,vars"/>    <property name="build.debuglevel"     value="source,lines,vars"/>
28    <property name="build.deprecation"    value="false"/>    <property name="build.deprecation"    value="false"/>
   <!--  
   <property name="build.warnings"       value="true"/>  
   -->  
29    
30    <!-- Build locations -->    <!-- Build locations -->
31    <property name="build.dir"            location="build"/>    <property name="build.dir"            location="build"/>
32    <property name="build.classes.dir"    location="${build.dir}/classes"/>    <property name="build.classes.dir"    location="${build.dir}/classes"/>
33      <property name="build.emulation.dir"  location="${build.dir}/emulation"/>
34    <property name="build.testcases.dir"  location="${build.dir}/testcases"/>    <property name="build.testcases.dir"  location="${build.dir}/testcases"/>
35    <property name="build.lib.dir"        location="${build.dir}/lib"/>    <property name="build.lib.dir"        location="${build.dir}/lib"/>
36    <property name="build.ant.dir"        location="${build.dir}/ant"/>    <property name="build.ant.dir"        location="${build.dir}/ant"/>
# Line 53  Line 42 
42    
43    <!-- Source locations -->    <!-- Source locations -->
44    <property name="src.dir"              location="${basedir}/src/main"/>    <property name="src.dir"              location="${basedir}/src/main"/>
45      <property name="emulation.src.dir"    location="${basedir}/src/emulation"/>
46    <property name="test.src.dir"         location="${basedir}/src/test"/>    <property name="test.src.dir"         location="${basedir}/src/test"/>
47    <property name="ant.src.dir"          location="${basedir}/etc/ant"/>    <property name="ant.src.dir"          location="${basedir}/etc/ant"/>
48    <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>    <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>
# Line 64  Line 54 
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    
   <property name="javac.args"           value='-J-Xbootclasspath/p:${javac.jar}'/>  
60    
   <path id="javac.bootclasspath">  
     <pathelement location="${collect.jar}"/>  
     <pathelement location="${rt.jar}"/>  
   </path>  
61    
62    <path id="test.classpath">    <!-- Files excluded from emulation and dist-docs -->
63      <pathelement location="${product.jar}"/>    <patternset id="emulation.excludes">
64    </path>      <exclude name="java/util/Random.*"/>
65        <exclude name="sun/misc/Unsafe.*"/>
66      </patternset>
67    
68    
69    
70    <!-- Main targets -->    <!-- Main targets -->
71    
72    <target name="compile" depends="init"    <target name="compile"
73            description="Compiles all sources to build folder">            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}"/>      <mkdir dir="${build.classes.dir}"/>
79      <javac srcdir="${src.dir}"  
80        <javac srcdir="${prepare.src.dir}"
81            destdir="${build.classes.dir}"            destdir="${build.classes.dir}"
82              debug="${build.debug}"              debug="${build.debug}"
83         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
# Line 95  Line 86 
86               fork="true">               fork="true">
87    
88        <bootclasspath refid="javac.bootclasspath"/>        <bootclasspath refid="javac.bootclasspath"/>
89        <compilerarg line="${javac.args} ${build.warnings.option}"/>        <compilerarg line="${build.javac.args}"/>
90    
91      </javac>      </javac>
92    
93    </target>    </target>
94    
95    
96    <target name="jar" depends="compile"    <target name="jar"
97            description="Builds library jar from compiled sources">            depends="configure-emulation, init-jar, native-jar, emulation-jar"
98      <mkdir dir="${build.lib.dir}"/>            description="Builds library jar from compiled sources"/>
     <jar basedir="${build.classes.dir}"  
         destfile="${product.jar}"  
     />  
   </target>  
99    
100    
101    <target name="test" depends="init, check-junit, report-tests"    <target name="test"
102            description="Runs all tests (requires JUnit 1.8 in ${ant.home}/lib)"/>            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"    <target name="checkstyle"
107              depends="filter-src"
108            description="Reports on style errors in Java source (verbose, mostly chaff)">            description="Reports on style errors in Java source (verbose, mostly chaff)">
109    
110      <taskdef resource="checkstyletask.properties"      <taskdef resource="checkstyletask.properties"
111              classpath="${lib.dir}/checkstyle-all-2.4.jar"/>              classpath="${lib.dir}/checkstyle-all-2.4.jar"/>
112    
# Line 123  Line 114 
114        <formatter type="plain"/>  <!-- also available: type="xml" -->        <formatter type="plain"/>  <!-- also available: type="xml" -->
115        <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>        <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
116      </checkstyle>      </checkstyle>
117    
118    </target>    </target>
119    
120    
121    <target name="doccheck" depends="filter-src"    <target name="doccheck"
122              depends="filter-src"
123            description="Reports on javadoc style errors (not working yet)">            description="Reports on javadoc style errors (not working yet)">
124    
125      <delete dir="${build.doccheck.dir}"/>      <delete dir="${build.doccheck.dir}"/>
126      <mkdir dir="${build.doccheck.dir}"/>      <mkdir dir="${build.doccheck.dir}"/>
127    
128      <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"      <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
129           docletpath="${lib.dir}/doccheck.jar"           docletpath="${lib.dir}/doccheck.jar"
130              destdir="${build.doccheck.dir}">              destdir="${build.doccheck.dir}">
131        <packageset dir="${build.filter.src.dir}"/>        <packageset dir="${build.filter.src.dir}"/>
132      </javadoc>      </javadoc>
133    
134    </target>    </target>
135    
136    
137    <target name="docs" depends="filter-src"    <target name="docs"
138              depends="filter-src"
139            description="Builds javadocs with custom tags to build folder">            description="Builds javadocs with custom tags to build folder">
140    
141      <delete dir="${build.javadocs.dir}"/>      <delete dir="${build.javadocs.dir}"/>
142      <mkdir dir="${build.javadocs.dir}"/>      <mkdir dir="${build.javadocs.dir}"/>
143    
144      <javadoc destdir="${build.javadocs.dir}"      <javadoc destdir="${build.javadocs.dir}"
145                  link="http://java.sun.com/j2se/1.4.1/docs/api"                  link="http://java.sun.com/j2se/1.4.1/docs/api"
146              overview="${src.dir}/intro.html"              overview="${src.dir}/intro.html"
147                source="${build.sourcelevel}">                source="${build.docsourcelevel}">
148    
149        <tag name="revised" description="Last revised:"/>        <tag name="revised" description="Last revised:"/>
150        <tag name="spec" description="Specified by:"/>        <tag name="spec" description="Specified by:"/>
151        <tag name="editor" description="Last edited by:"/>        <tag name="editor" description="Last edited by:"/>
152        <tag name="fixme" description="FIX ME:"/>        <tag name="fixme" description="FIX ME:"/>
153    
154        <packageset dir="${build.filter.src.dir}"/>        <packageset dir="${build.filter.src.dir}"/>
155    
156      </javadoc>      </javadoc>
157    
158    </target>    </target>
159    
160    
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     # javac -s doesn't reliably generate compilable code. It generates
169     # bridge methods (marked as "synthetic") that can have identical     # bridge methods (marked as "synthetic") that can have identical
170     # signatures to existing methods except for the return value.     # signatures to existing methods except for the return value.
171     -->     -->
   <target name="strip" depends="init">  
     <mkdir dir="${build.stripped.dir}"/>  
172      <javac srcdir="${src.dir}"      <javac srcdir="${src.dir}"
173            destdir="${build.stripped.dir}"            destdir="${build.stripped.dir}"
174              debug="${build.debug}"              debug="${build.debug}"
# Line 173  Line 178 
178               fork="true">               fork="true">
179    
180        <bootclasspath refid="javac.bootclasspath"/>        <bootclasspath refid="javac.bootclasspath"/>
181        <compilerarg line="${javac.args} ${build.warnings.option} -s"/>        <compilerarg line="${build.javac.args} -s"/>
182    
183      </javac>      </javac>
184    
185    </target>    </target>
186    
187    
188    <target name="dist" depends="init, dist-clean, dist-jar, dist-docs"    <target name="dist"
189              depends="init, dist-clean, dist-jar, dist-docs"
190            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
191    
192    
193    <target name="clean"    <target name="clean"
194            description="Removes all build products">            description="Removes all build products">
195    
196      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
197      <delete dir="${build.classes.dir}"/>      <delete dir="${build.classes.dir}"/>
198      <delete dir="${build.lib.dir}"/>      <delete dir="${build.lib.dir}"/>
199    
200    </target>    </target>
201    
202    
203    <target name="dist-clean"    <target name="dist-clean"
204            description="Removes all build and distribution products">            description="Removes all build and distribution products">
205    
206      <delete dir="${dist.dir}"/>      <delete dir="${dist.dir}"/>
207    
208    </target>    </target>
209    
210    
211    <!-- Anthill targets -->    <target name="dist-docs"
212              depends="filter-src"
213              description="Builds javadocs without custom tags to dist folder">
214    
215    <!-- Should really run the tests instead of just the jar target -->      <delete dir="${dist.javadocs.dir}"/>
216    <target name="anthill-build" depends="jar, docs, dist-docs"/>      <mkdir dir="${dist.javadocs.dir}"/>
217    
218    <target name="anthill-publish">      <javadoc destdir="${dist.javadocs.dir}"
219      <copy todir="${deployDir}/docs/private">                  link="http://java.sun.com/j2se/1.4.1/docs/api"
220        <fileset dir="${build.javadocs.dir}"/>              overview="${src.dir}/intro.html"
221      </copy>                source="${build.docsourcelevel}">
     <copy todir="${deployDir}/docs/public">  
       <fileset dir="${dist.javadocs.dir}"/>  
     </copy>  
     <copy tofile="${deployDir}/index.html"  
           file="${basedir}/etc/anthill-index.html"/>  
     <copy todir="${deployDir}/notes">  
       <fileset dir="${basedir}/etc/notes"/>  
     </copy>  
   </target>  
222    
223          <packageset dir="${build.filter.src.dir}"/>
224    
225    <!-- Internal targets -->      </javadoc>
226    
   <target name="set-warnings-if" if="build.warnings">  
     <property name="build.warnings.option" value="-warnunchecked"/>  
227    </target>    </target>
228    
229    
   <target name="set-warnings-unless" unless="build.warnings">  
     <property name="build.warnings.option" value=""/>  
   </target>  
230    
231      <!-- Internal targets -->
232    
233    
234      <target name="init">
235    
   <target name="init" depends="set-warnings-if, set-warnings-unless">  
236      <!-- Version is kept in a separate file -->      <!-- Version is kept in a separate file -->
237      <loadfile property="version" srcFile="version.properties"/>      <loadfile property="version" srcFile="version.properties"/>
238      <echo>Building JSR-166 version ${version}</echo>      <echo>Building JSR-166 version ${version}</echo>
239    
240    </target>    </target>
241    
242    
243    <target name="dist-jar" depends="clean, jar">    <target name="init-jar">
244      <copy file="${product.jar}" todir="${dist.dir}"/>  
245        <mkdir dir="${build.lib.dir}"/>
246    
247    </target>    </target>
248    
249    
250    <target name="dist-docs" depends="filter-src"    <target name="native-jar"
251            description="Builds javadocs without custom tags to dist folder">            depends="compile"
252      <delete dir="${dist.javadocs.dir}"/>            unless="build.emulation.true">
     <mkdir dir="${dist.javadocs.dir}"/>  
     <javadoc destdir="${dist.javadocs.dir}"  
                 link="http://java.sun.com/j2se/1.4.1/docs/api"  
             overview="${src.dir}/intro.html"  
               source="${build.sourcelevel}">  
253    
254        <packageset dir="${build.filter.src.dir}"/>      <jar destfile="${product.jar}">
255          <fileset dir="${build.classes.dir}"/>
256        </jar>
257    
258      </target>
259    
260    
261      <target name="compile-emulation"
262              depends="init, configure-compiler"
263              if="build.emulation.true">
264    
265        <mkdir dir="${build.emulation.dir}"/>
266    
267        <javac srcdir="${emulation.src.dir}"
268              destdir="${build.emulation.dir}"
269                debug="${build.debug}"
270           debuglevel="${build.debuglevel}"
271          deprecation="${build.deprecation}"
272               source="${build.sourcelevel}"
273                 fork="true">
274    
275          <bootclasspath refid="javac.bootclasspath"/>
276          <compilerarg line="${build.javac.args}"/>
277    
278        </javac>
279    
280      </target>
281    
282    
283      <target name="emulation-jar"
284              depends="compile-emulation"
285              if="build.emulation.true">
286    
287    
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"
299              depends="clean, jar">
300    
301        <copy file="${product.jar}" todir="${dist.dir}"/>
302    
     </javadoc>  
303    </target>    </target>
304    
305    
306    <target name="compile-ant-filter" depends="init">    <target name="compile-ant-filter"
307              depends="init">
308    
309      <mkdir dir="${build.ant.dir}"/>      <mkdir dir="${build.ant.dir}"/>
310    
311      <javac srcdir="${ant.src.dir}"      <javac srcdir="${ant.src.dir}"
312            destdir="${build.ant.dir}"            destdir="${build.ant.dir}"
313             source="1.4"             source="1.4"
314      />      />
315    
316    </target>    </target>
317    
318    
319    <target name="filter-src" depends="compile-ant-filter">    <target name="filter-src"
320              depends="compile-ant-filter">
321    
322      <mkdir dir="${build.filter.src.dir}"/>      <mkdir dir="${build.filter.src.dir}"/>
323    
324        <copy todir="${build.filter.src.dir}">
325          <fileset dir="${src.dir}">
326            <include name="**/*.html"/>
327          </fileset>
328        </copy>
329    
330      <copy todir="${build.filter.src.dir}">      <copy todir="${build.filter.src.dir}">
331        <fileset dir="${src.dir}">        <fileset dir="${src.dir}">
332          <include name="**/*.java"/>          <exclude name="**/*.html"/>
333            <patternset refid="emulation.excludes"/>
334        </fileset>        </fileset>
335        <filterchain>        <filterchain>
336          <filterreader classname="jsr166.ant.filters.ReplaceFilter"          <filterreader classname="jsr166.ant.filters.ReplaceFilter"
# Line 303  Line 364 
364          </filterreader>          </filterreader>
365        </filterchain>        </filterchain>
366      </copy>      </copy>
367    
368    </target>    </target>
369    
370    
371    <target name="compile-tests" depends="jar">    <target name="compile-tests"
372              depends="jar">
373    
374      <mkdir dir="${build.testcases.dir}"/>      <mkdir dir="${build.testcases.dir}"/>
375    
376      <javac srcdir="${test.src.dir}"      <javac srcdir="${test.src.dir}"
377            destdir="${build.testcases.dir}"            destdir="${build.testcases.dir}"
378              debug="${build.debug}"              debug="${build.debug}"
# Line 316  Line 381 
381             source="${build.sourcelevel}"             source="${build.sourcelevel}"
382               fork="true">               fork="true">
383    
       <bootclasspath refid="javac.bootclasspath"/>  
       <compilerarg line="${javac.args} ${build.warnings.option}"/>  
384        <classpath refid="test.classpath"/>        <classpath refid="test.classpath"/>
385          <bootclasspath refid="javac.bootclasspath"/>
386          <compilerarg line="${build.javac.args}"/>
387    
388      </javac>      </javac>
389    
390    </target>    </target>
391    
392    
393    <target name="run-tests" depends="compile-tests">    <target name="run-tests"
394              depends="compile-tests">
395    
396        <!-- May be overridden by user.properties -->
397        <property name="testcase" value="*"/>
398    
399      <mkdir dir="${build.reports.dir}"/>      <mkdir dir="${build.reports.dir}"/>
400    
401      <junit printsummary="true"      <junit printsummary="true"
402               showoutput="true"               showoutput="true"
403            errorProperty="junit.failed"            errorProperty="junit.failed"
# Line 333  Line 405 
405                      dir="${build.reports.dir}"                      dir="${build.reports.dir}"
406                     fork="true">                     fork="true">
407    
408        <!--        <jvmarg value="${test.bootclasspath.arg}"/>
        ! This nastiness is so JUnit can test classes we are inserting  
        ! into the java.* packages.  
        -->  
       <jvmarg value="-Xbootclasspath/p:${product.jar};${build.testcases.dir};${junit.jar}"/>  
409    
410        <formatter type="xml"/>        <formatter type="xml"/>
411    
# Line 348  Line 416 
416        </batchtest>        </batchtest>
417    
418      </junit>      </junit>
419    
420    </target>    </target>
421    
422    
423    <target name="report-tests" depends="run-tests">    <target name="report-tests"
424              depends="run-tests">
425    
426      <!-- Sets junit.report.format to frames if Xalan is present,      <!-- Sets junit.report.format to frames if Xalan is present,
427           otherwise sets it to noframes. -->           otherwise sets it to noframes. -->
428      <available property="junit.report.format"      <available property="junit.report.format"
# Line 371  Line 442 
442      </junitreport>      </junitreport>
443    
444      <fail message="Test Cases Failed" if="junit.failed"/>      <fail message="Test Cases Failed" if="junit.failed"/>
445    
446      </target>
447    
448    
449      <target name="configure-compiler">
450    
451        <property name="gjc.version"
452                 value="1.3"/>
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    
484        <!--
485         ! Bootclasspath munging for source compilation.
486         -->
487    
488        <path id="javac.bootclasspath.prefix">
489          <!-- <pathelement location="${src.dir}"/> -->
490          <pathelement location="${javac.jar}"/>
491        </path>
492    
493        <path id="javac.bootclasspath">
494          <!-- <pathelement location="${src.dir}"/> -->
495          <pathelement location="${collect.jar}"/>
496          <pathelement location="${rt.jar}"/>
497        </path>
498    
499        <!-- Flatten bootclasspath prefix into a platform-appropriate string -->
500        <property name="javac.bootclasspath.prefix"
501                 refid="javac.bootclasspath.prefix"/>
502    
503        <!-- Turn the flattened bootclasspath prefix into a javac argument -->
504        <property name="build.bootclasspath.arg"
505                 value='-J-Xbootclasspath/p:${javac.bootclasspath.prefix}'/>
506    
507        <!-- Flatten bootclasspath for trace message -->
508        <property name="javac.bootclasspath"
509                 refid="javac.bootclasspath"/>
510    
511        <!-- Common options in javac invocations -->
512        <property name="build.javac.args"
513                 value="${build.bootclasspath.arg} ${build.warnunchecked} ${build.novariance}"/>
514    
515        <echo>javac ${build.javac.args}</echo>
516        <echo>bootclasspath=${javac.bootclasspath}</echo>
517    
518    </target>    </target>
519    
520    
521    <target name="check-junit">    <target name="configure-src">
522      <!-- FIXME: this test isn't specific enough -->  
523        <condition property="prepare.src.dir" value="${build.dir}/prepare-src">
524          <istrue value="${build.nothreads}"/>
525        </condition>
526    
527      </target>
528    
529      <target name="prepare-src"
530              depends="configure-src"
531              if="prepare.src.dir">
532    
533        <mkdir dir="${prepare.src.dir}"/>
534        <copy todir="${prepare.src.dir}">
535          <fileset dir="${src.dir}">
536            <exclude name="java/lang/**"/>
537          </fileset>
538        </copy>
539    
540      </target>
541    
542    
543      <target name="configure-emulation">
544    
545        <condition property="build.emulation.true">
546          <or>
547            <and>
548              <os family="windows"/>
549              <not>
550                <isset property="build.emulation"/>
551              </not>
552            </and>
553            <istrue value="${build.emulation}"/>
554          </or>
555        </condition>
556    
557      </target>
558    
559    
560      <target name="configure-tests">
561    
562        <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
563      <available property="junit.available"      <available property="junit.available"
564                 classname="junit.framework.TestCase"/>                 classname="junit.framework.Protectable"/>
565      <fail message="Need JUnit 3.8 to run tests" unless="junit.available"/>  
566        <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
567              unless="junit.available"/>
568    
569    
570        <!--
571         ! Bootclasspath munging for testing, so JUnit can test our local
572         ! modifications to java.*.
573         -->
574    
575        <path id="test.classpath">
576          <pathelement location="${product.jar}"/>
577          <pathelement location="${build.testcases.dir}"/>
578          <pathelement location="${junit.jar}"/>
579        </path>
580    
581        <!-- Flatten test classpath into a platform-appropriate string -->
582        <property name="test.classpath" refid="test.classpath"/>
583    
584        <!-- Turn the flattened test classpath into a javac argument -->
585        <property name="test.bootclasspath.arg"
586                 value='-Xbootclasspath/p:${test.classpath}'/>
587    
588      </target>
589    
590    
591    
592      <!-- Anthill targets -->
593    
594      <target name="anthill-build"
595              depends="jar, test, docs, dist-docs"/>
596    
597      <target name="anthill-publish">
598    
599        <copy todir="${deployDir}/docs/private">
600          <fileset dir="${build.javadocs.dir}"/>
601        </copy>
602    
603        <copy todir="${deployDir}/docs/public">
604          <fileset dir="${dist.javadocs.dir}"/>
605        </copy>
606    
607        <copy tofile="${deployDir}/index.html"
608              file="${basedir}/etc/anthill-index.html"/>
609    
610        <copy todir="${deployDir}/notes">
611          <fileset dir="${basedir}/etc/notes"/>
612        </copy>
613    
614    </target>    </target>
615    
616    

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.33

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8