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

Diff of /jsr166/build.xml

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

revision 1.31 by tim, Wed May 28 21:15:50 2003 UTC revision 1.89 by jsr166, Fri Jun 10 18:07:30 2011 UTC
# Line 7  Line 7 
7    Usage: ant [target]    Usage: ant [target]
8    
9    User-specific settings are read from user.properties.    User-specific settings are read from user.properties.
10    See user.properties.sample for examples.    See user.properties.sample for an explanation of some useful settings.
11  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
12    </description>    </description>
13    
# Line 21  Line 21 
21    
22    
23    <!-- Compilation options -->    <!-- Compilation options -->
24    <property name="build.sourcelevel"    value="1.5"/>    <property name="build.sourcelevel"    value="1.6"/>
   <property name="build.docsourcelevel" value="1.4"/>  
25    <property name="build.debug"          value="true"/>    <property name="build.debug"          value="true"/>
26    <property name="build.debuglevel"     value="source,lines,vars"/>    <property name="build.debuglevel"     value="source,lines,vars"/>
27    <property name="build.deprecation"    value="false"/>    <property name="build.deprecation"    value="false"/>
   <property name="build.novariance.arg" value=""/>  
28    
29    <!-- Build locations -->    <!-- Build locations -->
30    <property name="build.dir"            location="build"/>    <property name="build.dir"                   location="build"/>
31    <property name="build.classes.dir"    location="${build.dir}/classes"/>    <property name="build.classes.dir"           location="${build.dir}/classes"/>
32    <property name="build.emulation.dir"  location="${build.dir}/emulation"/>    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>
33    <property name="build.testcases.dir"  location="${build.dir}/testcases"/>    <property name="build.loops.dir"             location="${build.dir}/loops"/>
34    <property name="build.lib.dir"        location="${build.dir}/lib"/>    <property name="build.lib.dir"               location="${build.dir}/lib"/>
35    <property name="build.ant.dir"        location="${build.dir}/ant"/>    <property name="build.javadocs.dir"          location="${build.dir}/javadocs"/>
36    <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>    <property name="build.reports.dir"           location="${build.dir}/reports"/>
37    <property name="build.stripped.dir"   location="${build.dir}/stripped"/>    <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>
38    <property name="build.reports.dir"    location="${build.dir}/reports"/>    <property name="build.jsr166xlib.dir"        location="${build.dir}/jsr166xlib"/>
39    <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>    <property name="build.jsr166xjavadocs.dir"   location="${build.dir}/jsr166xjavadocs"/>
40    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>  
41      <property name="build.jsr166y.dir"           location="${build.dir}/jsr166y"/>
42      <property name="build.jsr166ylib.dir"        location="${build.dir}/jsr166ylib"/>
43      <property name="build.jsr166yjavadocs.dir"   location="${build.dir}/jsr166yjavadocs"/>
44    
45      <property name="build.extra166y.dir"         location="${build.dir}/extra166y"/>
46      <property name="build.extra166ylib.dir"      location="${build.dir}/extra166ylib"/>
47      <property name="build.extra166yjavadocs.dir" location="${build.dir}/extra166yjavadocs"/>
48    
49    <!-- Source locations -->    <!-- Source locations -->
50    <property name="src.dir"              location="${basedir}/src/main"/>    <property name="src.dir"              location="${basedir}/src/main"/>
   <property name="emulation.src.dir"    location="${basedir}/src/emulation"/>  
51    <property name="test.src.dir"         location="${basedir}/src/test"/>    <property name="test.src.dir"         location="${basedir}/src/test"/>
52    <property name="ant.src.dir"          location="${basedir}/etc/ant"/>    <property name="loops.src.dir"        location="${basedir}/src/loops"/>
53    <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
54      <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>
55    <property name="lib.dir"              location="${basedir}/lib"/>    <property name="lib.dir"              location="${basedir}/lib"/>
56    <property name="dist.dir"             location="${basedir}/dist"/>    <property name="dist.dir"             location="${basedir}/dist"/>
57      <property name="topsrc.dir"           location="${basedir}/src"/>
58      <property name="jsr166xsrc.dir"       location="${basedir}/src/jsr166x"/>
59      <property name="jsr166ysrc.dir"       location="${basedir}/src/jsr166y"/>
60      <property name="extra166ysrc.dir"     location="${basedir}/src/extra166y"/>
61      <property name="jdksrc.dir"           location="/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"/>
62    <!-- Distribution locations -->    <!-- Distribution locations -->
63    <property name="dist.javadocs.dir"    location="${dist.dir}/docs"/>    <property name="dist.javadocs.dir"           location="${dist.dir}/docs"/>
64      <property name="dist.jsr166xjavadocs.dir"    location="${dist.dir}/jsr166xdocs"/>
65      <property name="dist.jsr166yjavadocs.dir"    location="${dist.dir}/jsr166ydocs"/>
66      <property name="dist.extra166yjavadocs.dir"  location="${dist.dir}/extra166ydocs"/>
67    
68    <!-- Jar locations -->    <!-- Jar locations -->
69    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
70    <property name="javac.jar"            location="${lib.dir}/javac.jar"/>    <property name="jsr166xproduct.jar"   location="${build.jsr166xlib.dir}/jsr166x.jar"/>
71    <property name="collect.jar"          location="${lib.dir}/collect.jar"/>    <property name="jsr166yproduct.jar"   location="${build.jsr166ylib.dir}/jsr166y.jar"/>
72      <property name="extra166yproduct.jar" location="${build.extra166ylib.dir}/extra166y.jar"/>
73    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
   <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>  
   
   
74    
75    <!--    <!-- Bootclasspath argument -->
76     ! Bootclasspath munging for source compilation.    <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>
    -->  
   
   <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="build.bootclasspath.arg"  
            value='-J-Xbootclasspath/p:${javac.bootclasspath.prefix}'/>  
   
   
   <!--  
    ! Bootclasspath munging for testing, so JUnit can test our local  
    ! modifications to java.*.  
    -->  
77    
78      <!-- Test classpath -->
79    <path id="test.classpath">    <path id="test.classpath">
     <pathelement location="${product.jar}"/>  
80      <pathelement location="${build.testcases.dir}"/>      <pathelement location="${build.testcases.dir}"/>
81      <pathelement location="${junit.jar}"/>      <pathelement location="${junit.jar}"/>
82    </path>    </path>
83    
84    <!-- Flatten test classpath into a platform-appropriate string -->    <!-- ALoops classpath -->
85    <property name="test.classpath" refid="test.classpath"/>    <path id="loops.classpath">
86        <pathelement location="${build.loops.dir}"/>
87    <!-- Turn the flattened test classpath into a javac argument -->    </path>
   <property name="test.bootclasspath.arg"  
            value='-Xbootclasspath/p:${test.classpath}'/>  
   
   
   
   <!-- Files excluded from emulation and dist-docs -->  
   <patternset id="emulation.excludes">  
     <exclude name="java/util/Random.*"/>  
     <exclude name="sun/misc/Unsafe.*"/>  
   </patternset>  
   
88    
89    
90    <!-- Main targets -->    <!-- Main targets -->
91    
92      <target name="dists"
93              depends="dist, jsr166xdist, jsr166ydist, extra166ydist"
94              description="Builds all public jars and docs"/>
95    
96    <target name="compile"    <target name="compile"
97            depends="init"            depends="init, configure-compiler"
98            description="Compiles main sources to build folder">            description="Compiles main sources to build folder">
99    
100      <mkdir dir="${build.classes.dir}"/>      <mkdir dir="${build.classes.dir}"/>
# Line 130  Line 107 
107             source="${build.sourcelevel}"             source="${build.sourcelevel}"
108               fork="true">               fork="true">
109    
110        <bootclasspath refid="javac.bootclasspath"/>        <include name="**/*.java"/>
111        <compilerarg line="${build.javac.args}"/>        <compilerarg value="-XDignore.symbol.file=true"/>
112    
113    <!--
114          <exclude name="java/lang/**"/>
115          <compilerarg line="${build.args}"/>
116          <compilerarg line="-Xlint -Xmaxwarns 1000"/>
117    -->
118    
119      </javac>      </javac>
120    
121    </target>    </target>
122    
123    
   <target name="jar"  
           depends="check-emulation, init-jar, native-jar, emulation-jar"  
           description="Builds library jar from compiled sources"/>  
   
124    
125    <target name="test"    <target name="jar"
126            depends="init, check-junit, report-tests"            depends="compile"
127            description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />            description="Builds library jar from compiled sources">
   
   
   <target name="checkstyle"  
           depends="filter-src"  
           description="Reports on style errors in Java source (verbose, mostly chaff)">  
128    
129      <taskdef resource="checkstyletask.properties"      <mkdir dir="${build.lib.dir}"/>
             classpath="${lib.dir}/checkstyle-all-2.4.jar"/>  
130    
131      <checkstyle>      <jar destfile="${product.jar}">
132        <formatter type="plain"/>  <!-- also available: type="xml" -->        <fileset dir="${build.classes.dir}"/>
133        <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>      </jar>
     </checkstyle>  
134    
135    </target>    </target>
136    
137    
   <target name="doccheck"  
           depends="filter-src"  
           description="Reports on javadoc style errors (not working yet)">  
   
     <delete dir="${build.doccheck.dir}"/>  
     <mkdir dir="${build.doccheck.dir}"/>  
138    
139      <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"    <target name="test"
140           docletpath="${lib.dir}/doccheck.jar"            depends="init, configure-tests, report-tests"
141              destdir="${build.doccheck.dir}">            description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
       <packageset dir="${build.filter.src.dir}"/>  
     </javadoc>  
142    
   </target>  
143    
144    
145    <target name="docs"    <target name="docs"
           depends="filter-src"  
146            description="Builds javadocs with custom tags to build folder">            description="Builds javadocs with custom tags to build folder">
147    
148      <delete dir="${build.javadocs.dir}"/>      <delete dir="${build.javadocs.dir}"/>
149      <mkdir dir="${build.javadocs.dir}"/>      <mkdir dir="${build.javadocs.dir}"/>
150    
151      <javadoc destdir="${build.javadocs.dir}"      <!-- the packagenames="none" hack below prevents scanning the -->
152                  link="http://java.sun.com/j2se/1.4.1/docs/api"      <!-- sourcepath for packages -->
             overview="${src.dir}/intro.html"  
               source="${build.docsourcelevel}">  
   
       <tag name="revised" description="Last revised:"/>  
       <tag name="spec"    description="Specified by:"/>  
       <tag name="editor"  description="Last edited by:"/>  
       <tag name="fixme"   description="FIX ME:"/>  
   
       <packageset dir="${build.filter.src.dir}"/>  
153    
154        <javadoc destdir="${build.javadocs.dir}"
155                 packagenames="none"
156                 link="http://download.oracle.com/javase/7/docs/api/"
157                 overview="${src.dir}/intro.html"
158                 sourcepath="${src.dir}:${jdksrc.dir}"
159                 additionalparam="-XDignore.symbol.file=true" >
160          <fileset dir="${src.dir}" defaultexcludes="yes">
161          <include name="**/*.java"/>
162          </fileset>
163      </javadoc>      </javadoc>
164    
165    </target>    </target>
166    
167    
   <target name="strip"  
           depends="init"  
           description="Strip generics from java source (not working yet)">  
   
     <mkdir dir="${build.stripped.dir}"/>  
168    
169      <!--    <target name="dist"
170       # javac -s doesn't reliably generate compilable code. It generates            depends="init, dist-clean, dist-jar, dist-docs"
171       # bridge methods (marked as "synthetic") that can have identical            description="Puts all distributable products in single hierarchy"/>
      # signatures to existing methods except for the return value.  
      -->  
     <javac srcdir="${src.dir}"  
           destdir="${build.stripped.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${build.sourcelevel}"  
              fork="true">  
172    
       <bootclasspath refid="javac.bootclasspath"/>  
       <compilerarg line="${build.javac.args} -s"/>  
173    
174      </javac>    <target name="release"
175              depends="dist"
176              description="Puts entire CVS tree, plus distribution productions, in a jar">
177    
178        <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
179    
180        <jar basedir="${basedir}" destfile="${release.jar}">
181          <!-- <exclude name="build/**"/> -->
182          <exclude name="${release.jar}"/>
183          <exclude name="user.properties"/>
184          <exclude name="etc/notes/**"/>
185          <exclude name="src/emulation/**"/>
186          <exclude name="**/SyntaxTest.java"/>
187          <exclude name="**/SuperfluousAbstract.java"/>
188        </jar>
189    
190    </target>    </target>
191    
192    
   <target name="dist"  
           depends="init, dist-clean, dist-jar, dist-docs"  
           description="Puts all distributable products in single hierarchy"/>  
   
193    
194    <target name="clean"    <target name="clean"
195            description="Removes all build products">            description="Removes all build products">
# Line 245  Line 201 
201    </target>    </target>
202    
203    
204    
205    <target name="dist-clean"    <target name="dist-clean"
206            description="Removes all build and distribution products">            description="Removes all build and distribution products">
207    
# Line 253  Line 210 
210    </target>    </target>
211    
212    
213    
214    <target name="dist-docs"    <target name="dist-docs"
           depends="filter-src"  
215            description="Builds javadocs without custom tags to dist folder">            description="Builds javadocs without custom tags to dist folder">
216    
217      <delete dir="${dist.javadocs.dir}"/>      <delete dir="${dist.javadocs.dir}"/>
218      <mkdir dir="${dist.javadocs.dir}"/>      <mkdir dir="${dist.javadocs.dir}"/>
219    
220      <javadoc destdir="${dist.javadocs.dir}"      <!-- the packagenames="none" hack below prevents scanning the -->
221                  link="http://java.sun.com/j2se/1.4.1/docs/api"      <!-- sourcepath for packages -->
             overview="${src.dir}/intro.html"  
               source="${build.docsourcelevel}">  
   
       <packageset dir="${build.filter.src.dir}"/>  
222    
223        <javadoc destdir="${dist.javadocs.dir}"
224                 packagenames="none"
225                 link="http://download.oracle.com/javase/7/docs/api/"
226                 overview="${src.dir}/intro.html"
227                 sourcepath="${src.dir}:${jdksrc.dir}"
228                 additionalparam="-XDignore.symbol.file=true" >
229          <fileset dir="${src.dir}" defaultexcludes="yes">
230          <include name="**/*.java"/>
231          </fileset>
232      </javadoc>      </javadoc>
233    
234    </target>    </target>
# Line 275  Line 237 
237    
238    <!-- Internal targets -->    <!-- Internal targets -->
239    
   <target name="set-warnings-if" if="build.warnings">  
   
     <property name="build.warnings.arg" value="-warnunchecked"/>  
   
   </target>  
240    
241      <target name="init">
   <target name="set-warnings-unless" unless="build.warnings">  
   
     <property name="build.warnings.arg" value=""/>  
   
   </target>  
   
   
   <target name="init"  
           depends="set-warnings-if, set-warnings-unless">  
242    
243      <!-- Version is kept in a separate file -->      <!-- Version is kept in a separate file -->
244      <loadfile property="version" srcFile="version.properties"/>      <loadfile property="version" srcFile="version.properties"/>
245      <echo>Building JSR-166 version ${version}</echo>      <echo>Building JSR-166 version ${version}</echo>
246        <echo>java.home is ${java.home}</echo>
     <!-- Common options in javac invocations -->  
     <property name="build.javac.args"  
              value="${build.bootclasspath.arg} ${build.warnings.arg} ${build.novariance.arg}"/>  
247    
248    </target>    </target>
249    
250    
251    <target name="init-jar">    <target name="dist-jar"
252              depends="clean, jar">
     <mkdir dir="${build.lib.dir}"/>  
   
   </target>  
   
   
   <target name="native-jar"  
           depends="compile"  
           unless="build.emulation.true">  
253    
254      <jar destfile="${product.jar}">      <copy file="${product.jar}" todir="${dist.dir}"/>
       <fileset dir="${build.classes.dir}"/>  
     </jar>  
255    
256    </target>    </target>
257    
258    
259    <target name="compile-emulation"    <target name="compile-tests"
260            depends="init"            depends="jar">
           if="build.emulation.true">  
261    
262      <mkdir dir="${build.emulation.dir}"/>      <mkdir dir="${build.testcases.dir}"/>
263    
264      <javac srcdir="${emulation.src.dir}"      <javac srcdir="${tck.src.dir}"
265            destdir="${build.emulation.dir}"            destdir="${build.testcases.dir}"
266              debug="${build.debug}"              debug="${build.debug}"
267         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
268        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
269             source="${build.sourcelevel}"             source="${build.sourcelevel}"
270               fork="true">               fork="true">
271    
272        <bootclasspath refid="javac.bootclasspath"/>        <compilerarg value="${bootclasspath.args}"/>
273        <compilerarg line="${build.javac.args}"/>        <compilerarg line="${build.args}"/>
274          <compilerarg value="-XDignore.symbol.file=true"/>
     </javac>  
   
   </target>  
   
   
   <target name="emulation-jar"  
           depends="compile-emulation"  
           if="build.emulation.true">  
   
   
     <jar destfile="${product.jar}" duplicate="add">  
       <fileset dir="${build.classes.dir}">  
         <patternset refid="emulation.excludes"/>  
       </fileset>  
       <fileset dir="${build.emulation.dir}"/>  
     </jar>  
   
   </target>  
   
   
   <target name="dist-jar"  
           depends="clean, jar">  
   
     <copy file="${product.jar}" todir="${dist.dir}"/>  
275    
276    </target>        <classpath refid="test.classpath"/>
   
   
   <target name="compile-ant-filter"  
           depends="init">  
   
     <mkdir dir="${build.ant.dir}"/>  
   
     <javac srcdir="${ant.src.dir}"  
           destdir="${build.ant.dir}"  
            source="1.4"  
     />  
   
   </target>  
   
   
   <target name="filter-src"  
           depends="compile-ant-filter">  
   
     <mkdir dir="${build.filter.src.dir}"/>  
277    
278      <copy todir="${build.filter.src.dir}">      </javac>
       <fileset dir="${src.dir}">  
         <include name="**/*.html"/>  
       </fileset>  
     </copy>  
279    
280      <copy todir="${build.filter.src.dir}">      <javac srcdir="${test.src.dir}"
281        <fileset dir="${src.dir}">            destdir="${build.testcases.dir}"
282          <exclude name="**/*.html"/>              debug="${build.debug}"
283          <patternset refid="emulation.excludes"/>         debuglevel="${build.debuglevel}"
284        </fileset>        deprecation="${build.deprecation}"
285        <filterchain>             source="${build.sourcelevel}"
286          <filterreader classname="jsr166.ant.filters.ReplaceFilter"               fork="true">
                       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.)  
            -->  
           <param name="notmatching" value="^\s+\*\s.*$"/>  
           <param name="pattern" value="&lt;[^|>()]+?>+"/>  
           <param name="replacement" value=" "/>  
         </filterreader>  
         <filterreader classname="jsr166.ant.filters.ReplaceFilter"  
                       classpath="${build.ant.dir}">  
           <!--  
            # These arguments are to uncomment lines beginning with  
            # "//@" 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="^//@"/>  
           <param name="replacement" value=""/>  
         </filterreader>  
       </filterchain>  
     </copy>  
287    
288    </target>        <include name="jsr166/test/**"/>
289    
290          <compilerarg value="${bootclasspath.args}"/>
291          <compilerarg line="${build.args}"/>
292          <compilerarg value="-XDignore.symbol.file=true"/>
293    
294    <target name="compile-tests"        <classpath refid="test.classpath"/>
           depends="jar">  
295    
296      <mkdir dir="${build.testcases.dir}"/>      </javac>
297    
298      <javac srcdir="${test.src.dir}"  <!--
299        <javac srcdir="${jtreg.src.dir}"
300            destdir="${build.testcases.dir}"            destdir="${build.testcases.dir}"
301              debug="${build.debug}"              debug="${build.debug}"
302         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
# Line 444  Line 304 
304             source="${build.sourcelevel}"             source="${build.sourcelevel}"
305               fork="true">               fork="true">
306    
307          <compilerarg value="${bootclasspath.args}"/>
308          <compilerarg line="${build.args}"/>
309          <compilerarg value="-XDignore.symbol.file=true"/>
310    
311        <classpath refid="test.classpath"/>        <classpath refid="test.classpath"/>
       <bootclasspath refid="javac.bootclasspath"/>  
       <compilerarg line="${build.javac.args}"/>  
312    
313      </javac>      </javac>
314    -->
315    
316    </target>    </target>
317    
# Line 468  Line 331 
331                      dir="${build.reports.dir}"                      dir="${build.reports.dir}"
332                     fork="true">                     fork="true">
333    
334        <jvmarg value="${test.bootclasspath.arg}"/>        <jvmarg value="${bootclasspath.args}"/>
335          <jvmarg value="-server"/>
336          <jvmarg value="-showversion"/>
337    
338          <classpath refid="test.classpath"/>
339    
340        <formatter type="xml"/>        <formatter type="xml"/>
341    
342        <batchtest todir="${build.reports.dir}">        <batchtest todir="${build.reports.dir}" unless="no.test.tck">
343            <fileset dir="${tck.src.dir}">
344              <include name="**/${testcase}Test.java"/>
345            </fileset>
346          </batchtest>
347    
348          <batchtest todir="${build.reports.dir}" if="do.test.old">
349          <fileset dir="${test.src.dir}">          <fileset dir="${test.src.dir}">
350              <include name="jsr166/test/**/${testcase}Test.java"/>
351            </fileset>
352          </batchtest>
353    
354    <!--
355          <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
356            <fileset dir="${jtreg.src.dir}">
357            <include name="**/${testcase}Test.java"/>            <include name="**/${testcase}Test.java"/>
358          </fileset>          </fileset>
359        </batchtest>        </batchtest>
360    -->
361    
362      </junit>      </junit>
363    
# Line 486  Line 367 
367    <target name="report-tests"    <target name="report-tests"
368            depends="run-tests">            depends="run-tests">
369    
370      <!-- Sets junit.report.format to frames if Xalan is present,      <!-- Sets junit.report.format to frames if redirection is present,
371           otherwise sets it to noframes. -->           otherwise sets it to noframes. -->
372      <available property="junit.report.format"      <available property="junit.report.format"
373                    value="frames"                    value="frames"
# Line 498  Line 379 
379        <fileset dir="${build.reports.dir}">        <fileset dir="${build.reports.dir}">
380          <include name="TEST-*.xml"/>          <include name="TEST-*.xml"/>
381        </fileset>        </fileset>
382        <report styledir="${stylesheet.dir}"        <report format="${junit.report.format}" todir="${build.reports.dir}"
                 format="${junit.report.format}"  
                  todir="${build.reports.dir}"  
383        />        />
384      </junitreport>      </junitreport>
385    
# Line 509  Line 388 
388    </target>    </target>
389    
390    
391    <target name="check-junit">    <target name="configure-compiler">
392    
393        <property name="unchecked.option" value="-Xlint:unchecked"/>
394    
395        <condition property="warnunchecked.arg" value="${unchecked.option}">
396          <istrue value="${build.warnunchecked}"/>
397        </condition>
398    
399        <property name="warnunchecked.arg" value=""/>
400    
401    
402        <!-- Common options in javac invocations -->
403        <property name="build.args" value="${warnunchecked.arg}"/>
404    
405      </target>
406    
407    
408      <target name="configure-tests"
409           depends="configure-compiler">
410    
411      <!-- 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 -->
412      <available property="junit.available"      <available property="junit.available"
413                 classname="junit.framework.Protectable"/>                 classname="junit.framework.Protectable"/>
414    
415        <!-- Xalan -->
416        <available property="xalan.available"
417                   classname="org.apache.xalan.Version"/>
418    
419    
420        <!-- Ant 1.6beta and later don't need or want this check -->
421        <!--
422      <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"
423            unless="junit.available"/>            unless="junit.available"/>
424    
425        <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"
426              unless="xalan.available"/>
427        -->
428    
429    </target>    </target>
430    
431    
432    <target name="check-emulation">    <!-- Various demos and test programs -->
433      <condition property="build.emulation.true">  
434        <or>  
435          <isset property="build.emulation"/>    <target name="loops" depends="init, configure-compiler"
436          <os family="windows"/>            description="Benchmark from Doug Lea's AQS paper">
437        </or>  
438      </condition>      <mkdir dir="${build.loops.dir}"/>
439    
440        <javac srcdir="${loops.src.dir}"
441              destdir="${build.loops.dir}"
442                debug="${build.debug}"
443           debuglevel="${build.debuglevel}"
444          deprecation="${build.deprecation}"
445               source="${build.sourcelevel}"
446                 fork="true">
447    
448          <compilerarg line="${build.args}"/>
449          <classpath refid="loops.classpath"/>
450          <compilerarg value="-XDignore.symbol.file=true"/>
451    
452        </javac>
453    
454        <java classname="ALoops" fork="true">
455          <classpath refid="loops.classpath"/>
456        </java>
457    
458      </target>
459    
460    
461      <!-- jsr166x -->
462    
463    
464      <target name="jsr166xcompile"
465              depends="init, configure-compiler"
466              description="Compiles jsr166x sources">
467    
468        <mkdir dir="${build.jsr166x.dir}"/>
469    
470        <javac srcdir="${jsr166xsrc.dir}"
471              destdir="${build.jsr166x.dir}"
472                debug="${build.debug}"
473           debuglevel="${build.debuglevel}"
474          deprecation="${build.deprecation}"
475               source="${build.sourcelevel}"
476                 fork="true">
477    
478          <include name="**/*.java"/>
479          <compilerarg line="${build.args}"/>
480          <compilerarg value="-XDignore.symbol.file=true"/>
481    
482        </javac>
483    
484      </target>
485    
486    
487    
488      <target name="jsr166xjar"
489              depends="jsr166xcompile"
490              description="Builds library jar from compiled sources">
491    
492        <mkdir dir="${build.jsr166xlib.dir}"/>
493    
494        <jar destfile="${jsr166xproduct.jar}">
495          <fileset dir="${build.jsr166x.dir}"/>
496        </jar>
497    
498      </target>
499    
500    
501    
502      <target name="jsr166xdocs"
503              description="Builds javadocs with custom tags to build folder">
504    
505        <delete dir="${build.jsr166xjavadocs.dir}"/>
506        <mkdir dir="${build.jsr166xjavadocs.dir}"/>
507    
508        <javadoc destdir="${build.jsr166xjavadocs.dir}"
509                 packagenames="jsr166x"
510                 link="http://download.oracle.com/javase/7/docs/api/"
511                 source="${build.sourcelevel}"
512                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
513                 additionalparam="-XDignore.symbol.file=true" />
514    
515      </target>
516    
517    
518      <target name="jsr166xdist"
519              depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs"
520              description="Puts all distributable products in single hierarchy"/>
521    
522    
523    
524      <target name="jsr166xclean"
525              description="Removes all build products">
526    
527        <delete dir="${build.jsr166x.dir}"/>
528        <delete dir="${build.jsr166xlib.dir}"/>
529    
530      </target>
531    
532    
533    
534      <target name="jsr166xdist-clean"
535              description="Removes all build and distribution products">
536    
537      </target>
538    
539    
540    
541      <target name="jsr166xdist-docs"
542              description="Builds javadocs without custom tags to dist folder">
543    
544        <delete dir="${dist.jsr166xjavadocs.dir}"/>
545        <mkdir dir="${dist.jsr166xjavadocs.dir}"/>
546    
547        <javadoc destdir="${dist.jsr166xjavadocs.dir}"
548                 packagenames="jsr166x"
549                 link="http://download.oracle.com/javase/7/docs/api/"
550                 source="${build.sourcelevel}"
551                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
552                 additionalparam="-XDignore.symbol.file=true" />
553    
554      </target>
555    
556      <target name="jsr166xdist-jar"
557              depends="jsr166xclean, jsr166xjar">
558    
559        <copy file="${jsr166xproduct.jar}" todir="${dist.dir}"/>
560    
561      </target>
562    
563      <!-- jsr166y -->
564    
565    
566      <target name="jsr166ycompile"
567              depends="init, configure-compiler"
568              description="Compiles jsr166y sources">
569    
570        <mkdir dir="${build.jsr166y.dir}"/>
571    
572        <javac srcdir="${jsr166ysrc.dir}"
573              destdir="${build.jsr166y.dir}"
574                debug="${build.debug}"
575           debuglevel="${build.debuglevel}"
576          deprecation="${build.deprecation}"
577               source="${build.sourcelevel}"
578                 fork="true">
579    
580          <include name="**/*.java"/>
581          <compilerarg line="${build.args}"/>
582          <compilerarg value="-XDignore.symbol.file=true"/>
583          <compilerarg value="${bootclasspath.args}"/>
584    
585    <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
586    
587        </javac>
588    
589      </target>
590    
591    
592    
593      <target name="jsr166yjar"
594              depends="jsr166ycompile"
595              description="Builds library jar from compiled sources">
596    
597        <mkdir dir="${build.jsr166ylib.dir}"/>
598    
599        <jar destfile="${jsr166yproduct.jar}" index="true">
600          <fileset dir="${build.jsr166y.dir}"/>
601        </jar>
602    
603      </target>
604    
605    
606    
607      <target name="jsr166ydocs"
608              description="Builds javadocs with custom tags to build folder">
609    
610        <delete dir="${build.jsr166yjavadocs.dir}"/>
611        <mkdir dir="${build.jsr166yjavadocs.dir}"/>
612    
613        <javadoc destdir="${build.jsr166yjavadocs.dir}"
614                 packagenames="jsr166y"
615                 link="http://download.oracle.com/javase/7/docs/api/"
616                 source="${build.sourcelevel}"
617                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
618                 additionalparam="-XDignore.symbol.file=true" />
619    
620    </target>    </target>
621    
622    
623      <target name="jsr166ydist"
624              depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydist-docs"
625              description="Puts all distributable products in single hierarchy"/>
626    
   <!-- Anthill targets -->  
627    
   <target name="anthill-build"  
           depends="jar, test, docs, dist-docs"/>  
628    
629    <target name="anthill-publish">    <target name="jsr166yclean"
630              description="Removes all build products">
631    
632      <copy todir="${deployDir}/docs/private">      <delete dir="${build.jsr166y.dir}"/>
633        <fileset dir="${build.javadocs.dir}"/>      <delete dir="${build.jsr166ylib.dir}"/>
     </copy>  
634    
635      <copy todir="${deployDir}/docs/public">    </target>
       <fileset dir="${dist.javadocs.dir}"/>  
     </copy>  
636    
     <copy tofile="${deployDir}/index.html"  
           file="${basedir}/etc/anthill-index.html"/>  
637    
638      <copy todir="${deployDir}/notes">  
639        <fileset dir="${basedir}/etc/notes"/>    <target name="jsr166ydist-clean"
640      </copy>            description="Removes all build and distribution products">
641    
642    </target>    </target>
643    
644      <target name="jsr166ydist-docs"
645              description="Builds javadocs without custom tags to dist folder">
646    
647        <delete dir="${dist.jsr166yjavadocs.dir}"/>
648        <mkdir dir="${dist.jsr166yjavadocs.dir}"/>
649    
650        <javadoc destdir="${dist.jsr166yjavadocs.dir}"
651                 packagenames="jsr166y"
652                 link="http://download.oracle.com/javase/7/docs/api/"
653                 source="${build.sourcelevel}"
654                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
655                 additionalparam="-XDignore.symbol.file=true" />
656    
657      </target>
658    
659      <target name="jsr166ydist-jar"
660              depends="jsr166yclean, jsr166yjar">
661    
662        <copy file="${jsr166yproduct.jar}" todir="${dist.dir}"/>
663    
664      </target>
665    
666      <!-- extra166y -->
667    
668    
669      <target name="extra166ycompile"
670              depends="init, configure-compiler, jsr166ycompile"
671              description="Compiles extra166y sources">
672    
673        <mkdir dir="${build.extra166y.dir}"/>
674    
675        <javac srcdir="${extra166ysrc.dir}"
676              destdir="${build.extra166y.dir}"
677                debug="${build.debug}"
678                classpath="${jsr166yproduct.jar}"
679           debuglevel="${build.debuglevel}"
680          deprecation="${build.deprecation}"
681               source="${build.sourcelevel}"
682                 fork="true">
683    
684          <include name="**/*.java"/>
685          <compilerarg line="${build.args}"/>
686          <compilerarg value="-XDignore.symbol.file=true"/>
687          <compilerarg value="${bootclasspath.args}"/>
688    
689    <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
690    
691        </javac>
692    
693      </target>
694    
695    
696    
697      <target name="extra166yjar"
698              depends="extra166ycompile"
699              description="Builds library jar from compiled sources">
700    
701        <mkdir dir="${build.extra166ylib.dir}"/>
702    
703        <jar destfile="${extra166yproduct.jar}" index="true">
704          <fileset dir="${build.extra166y.dir}"/>
705        </jar>
706    
707      </target>
708    
709    
710    
711      <target name="extra166ydocs"
712              description="Builds javadocs with custom tags to build folder">
713    
714        <delete dir="${build.extra166yjavadocs.dir}"/>
715        <mkdir dir="${build.extra166yjavadocs.dir}"/>
716    
717        <javadoc destdir="${build.extra166yjavadocs.dir}"
718                 packagenames="extra166y"
719                 link="http://download.oracle.com/javase/7/docs/api/"
720                 source="${build.sourcelevel}"
721                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
722                 additionalparam="-XDignore.symbol.file=true" />
723    
724      </target>
725    
726    
727      <target name="extra166ydist"
728              depends="extra166ydist-clean, extra166ydist-jar, extra166ydist-docs"
729              description="Puts all distributable products in single hierarchy"/>
730    
731    
732    
733      <target name="extra166yclean"
734              description="Removes all build products">
735    
736        <delete dir="${build.extra166y.dir}"/>
737        <delete dir="${build.extra166ylib.dir}"/>
738    
739      </target>
740    
741    
742    
743      <target name="extra166ydist-clean"
744              description="Removes all build and distribution products">
745    
746      </target>
747    
748      <target name="extra166ydist-docs"
749              description="Builds javadocs without custom tags to dist folder">
750    
751        <delete dir="${dist.extra166yjavadocs.dir}"/>
752        <mkdir dir="${dist.extra166yjavadocs.dir}"/>
753    
754        <javadoc destdir="${dist.extra166yjavadocs.dir}"
755                 packagenames="extra166y"
756                 link="http://download.oracle.com/javase/7/docs/api/"
757                 source="${build.sourcelevel}"
758                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
759                 additionalparam="-XDignore.symbol.file=true" />
760    
761      </target>
762    
763      <target name="extra166ydist-jar"
764              depends="extra166yclean, extra166yjar">
765    
766        <copy file="${extra166yproduct.jar}" todir="${dist.dir}"/>
767    
768      </target>
769    
770  </project>  </project>

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.89

dl@cs.oswego.edu
ViewVC Help
Powered by ViewVC 1.1.27