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

Diff of /jsr166/build.xml

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

revision 1.29 by tim, Wed May 28 14:09:03 2003 UTC revision 1.97 by jsr166, Tue Jan 15 01:15:02 2013 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"/>
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"/>  
38    <property name="build.reports.dir"    location="${build.dir}/reports"/>    <property name="build.jdk7.dir"              location="${build.dir}/jdk7"/>
39    <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>    <property name="build.jdk7.lib.dir"          location="${build.jdk7.dir}"/>
40    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>    <property name="build.jdk7.classes.dir"      location="${build.jdk7.dir}/classes"/>
41      <property name="build.jdk7.tck.classes.dir"  location="${build.jdk7.dir}/tck/classes"/>
42      <property name="build.jdk7.docs.dir"         location="${build.jdk7.dir}/docs"/>
43    
44      <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>
45      <property name="build.jsr166xlib.dir"        location="${build.dir}/jsr166xlib"/>
46      <property name="build.jsr166xjavadocs.dir"   location="${build.dir}/jsr166xjavadocs"/>
47    
48      <property name="build.jsr166y.dir"           location="${build.dir}/jsr166y"/>
49      <property name="build.jsr166ylib.dir"        location="${build.dir}/jsr166ylib"/>
50      <property name="build.jsr166yjavadocs.dir"   location="${build.dir}/jsr166yjavadocs"/>
51    
52      <property name="build.jsr166e.dir"           location="${build.dir}/jsr166e"/>
53      <property name="build.jsr166elib.dir"        location="${build.dir}/jsr166elib"/>
54      <property name="build.jsr166ejavadocs.dir"   location="${build.dir}/jsr166ejavadocs"/>
55    
56      <property name="build.extra166y.dir"         location="${build.dir}/extra166y"/>
57      <property name="build.extra166ylib.dir"      location="${build.dir}/extra166ylib"/>
58      <property name="build.extra166yjavadocs.dir" location="${build.dir}/extra166yjavadocs"/>
59    
60      <!-- JDK binary locations -->
61      <property name="jdks.home"  location="${user.home}/jdk"/>
62    
63      <macrodef name="defjdklocations">
64        <attribute name="v"/>
65        <sequential>
66        <property name="jdk@{v}.home"  location="${jdks.home}/jdk@{v}"/>
67        <property name="java@{v}"      location="${jdk@{v}.home}/bin/java"/>
68        <property name="javac@{v}"     location="${jdk@{v}.home}/bin/javac"/>
69        <property name="javadoc@{v}"   location="${jdk@{v}.home}/bin/javadoc"/>
70        <property name="bootdir@{v}"   location="${jdk@{v}.home}/jre/lib"/>
71        <property name="bootclasspath@{v}"
72         value="${bootdir@{v}}/resources.jar:${bootdir@{v}}/rt.jar:${bootdir@{v}}/jsse.jar:${bootdir@{v}}/jce.jar:${bootdir@{v}}/:${bootdir@{v}}/charsets.jar"/>
73        </sequential>
74      </macrodef>
75    
76      <defjdklocations v="6"/>
77      <defjdklocations v="7"/>
78      <defjdklocations v="8"/>
79    
80      <macrodef name="run-tck-tests">
81        <attribute name="jvm"/>
82        <attribute name="tck.classes"/>
83        <attribute name="product.jar" default="${product.jar}"/>
84        <attribute name="jvmflags" default=""/>
85        <sequential>
86        <java classname="JSR166TestCase"
87              jvm="@{jvm}" fork="true">
88            <jvmarg value="-Xbootclasspath/p:@{product.jar}"/>
89            <jvmarg line="@{jvmflags}"/>
90            <classpath>
91              <pathelement location="${junit.jar}"/>
92              <pathelement location="@{tck.classes}"/>
93            </classpath>
94        </java>
95        </sequential>
96      </macrodef>
97    
98    <!-- Source locations -->    <!-- Source locations -->
99    <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"/>  
100    <property name="test.src.dir"         location="${basedir}/src/test"/>    <property name="test.src.dir"         location="${basedir}/src/test"/>
101    <property name="ant.src.dir"          location="${basedir}/etc/ant"/>    <property name="loops.src.dir"        location="${basedir}/src/loops"/>
102    <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
103      <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>
104    <property name="lib.dir"              location="${basedir}/lib"/>    <property name="lib.dir"              location="${basedir}/lib"/>
105    <property name="dist.dir"             location="${basedir}/dist"/>    <property name="dist.dir"             location="${basedir}/dist"/>
106      <property name="topsrc.dir"           location="${basedir}/src"/>
107      <property name="jdk7src.dir"          location="${topsrc.dir}/jdk7"/>
108      <property name="jsr166xsrc.dir"       location="${topsrc.dir}/jsr166x"/>
109      <property name="jsr166ysrc.dir"       location="${topsrc.dir}/jsr166y"/>
110      <property name="jsr166esrc.dir"       location="${topsrc.dir}/jsr166e"/>
111      <property name="extra166ysrc.dir"     location="${topsrc.dir}/extra166y"/>
112      <property name="jdksrc.dir"           location="/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"/>
113    
114    <!-- Distribution locations -->    <!-- Distribution locations -->
115    <property name="dist.javadocs.dir"    location="${dist.dir}/docs"/>    <property name="dist.javadocs.dir"           location="${dist.dir}/docs"/>
116      <property name="dist.jdk7.docs.dir"          location="${dist.dir}/jsr166-jdk7docs"/>
117      <property name="dist.jsr166xjavadocs.dir"    location="${dist.dir}/jsr166xdocs"/>
118      <property name="dist.jsr166yjavadocs.dir"    location="${dist.dir}/jsr166ydocs"/>
119      <property name="dist.jsr166ejavadocs.dir"    location="${dist.dir}/jsr166edocs"/>
120      <property name="dist.extra166yjavadocs.dir"  location="${dist.dir}/extra166ydocs"/>
121    
122    <!-- Jar locations -->    <!-- Jar locations -->
123    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
124    <property name="javac.jar"            location="${lib.dir}/javac.jar"/>    <property name="jdk7product.jar"      location="${build.jdk7.lib.dir}/jsr166-jdk7.jar"/>
125    <property name="collect.jar"          location="${lib.dir}/collect.jar"/>    <property name="jsr166xproduct.jar"   location="${build.jsr166xlib.dir}/jsr166x.jar"/>
126      <property name="jsr166yproduct.jar"   location="${build.jsr166ylib.dir}/jsr166y.jar"/>
127      <property name="jsr166eproduct.jar"   location="${build.jsr166elib.dir}/jsr166e.jar"/>
128      <property name="extra166yproduct.jar" location="${build.extra166ylib.dir}/extra166y.jar"/>
129    <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"/>  
130    
131      <!-- Bootclasspath argument -->
132      <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>
133    
134      <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
135      <property name="jdkapi5docs.url"      value="http://docs.oracle.com/javase/1.5.0/docs/api/"/>
136      <property name="jdkapi6docs.url"      value="http://docs.oracle.com/javase/6/docs/api/"/>
137      <property name="jdkapi7docs.url"      value="http://docs.oracle.com/javase/7/docs/api/"/>
138    
139      <property name="jdkapi8docs.url"      value="http://download.java.net/jdk8/docs/api/"/>
140      <!-- The below does not yet exist as of 2012-11 -->
141      <!-- <property name="jdkapi8docs.url" value="http://docs.oracle.com/javase/8/docs/api/"/> -->
142      <property name="jdkapidocs.url"       value="${jdkapi7docs.url}"/>
143    
144    <!--    <!-- Test classpath -->
    ! Bootclasspath munging for source compilation.  
    -->  
   
   <path id="javac.bootclasspath.prefix">  
     <!-- <pathelement location="${src.dir}"/> -->  
     <pathelement location="${javac.jar}"/>  
   </path>  
   
   <path id="javac.bootclasspath">  
     <!-- <pathelement location="${src.dir}"/> -->  
     <pathelement location="${collect.jar}"/>  
     <pathelement location="${rt.jar}"/>  
   </path>  
   
   <!-- Flatten bootclasspath prefix into a platform-appropriate string -->  
   <property name="javac.bootclasspath.prefix" refid="javac.bootclasspath.prefix"/>  
   
   <!-- Turn the flattened bootclasspath prefix into a javac argument -->  
   <property name="javac.args" value='-J-Xbootclasspath/p:${javac.bootclasspath.prefix}'/>  
   
   
   
   <!--  
    ! Bootclasspath munging for testing, so JUnit can test our local  
    ! modifications to java.*.  
    -->  
   
145    <path id="test.classpath">    <path id="test.classpath">
     <pathelement location="${product.jar}"/>  
146      <pathelement location="${build.testcases.dir}"/>      <pathelement location="${build.testcases.dir}"/>
147      <pathelement location="${junit.jar}"/>      <pathelement location="${junit.jar}"/>
148    </path>    </path>
149    
150    <!-- Flatten test classpath into a platform-appropriate string -->    <!-- ALoops classpath -->
151    <property name="test.classpath" refid="test.classpath"/>    <path id="loops.classpath">
152        <pathelement location="${build.loops.dir}"/>
153    <!-- Turn the flattened test classpath into a javac argument -->    </path>
   <property name="test.javac.args" 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>  
   
154    
155    
156    <!-- Main targets -->    <!-- Main targets -->
157    
158      <target name="dists"
159              depends="dist, jsr166xdist, jsr166ydist,jsr166edist,  extra166ydist"
160              description="Builds all public jars and docs"/>
161    
162    <target name="compile"    <target name="compile"
163            depends="init"            depends="init, configure-compiler"
164            description="Compiles main sources to build folder">            description="Compiles main sources to build folder">
165    
166      <mkdir dir="${build.classes.dir}"/>      <mkdir dir="${build.classes.dir}"/>
# Line 127  Line 173 
173             source="${build.sourcelevel}"             source="${build.sourcelevel}"
174               fork="true">               fork="true">
175    
176        <bootclasspath refid="javac.bootclasspath"/>        <include name="**/*.java"/>
177        <compilerarg line="${javac.args} ${build.warnings.option}"/>        <compilerarg value="-XDignore.symbol.file=true"/>
178    
179    <!--
180          <exclude name="java/lang/**"/>
181          <compilerarg line="${build.args}"/>
182          <compilerarg line="-Xlint -Xmaxwarns 1000"/>
183    -->
184    
185      </javac>      </javac>
186    
187    </target>    </target>
188    
189    
190    
191    <target name="jar"    <target name="jar"
192            depends="native-jar, emulation-jar"            depends="compile"
193            description="Builds library jar from compiled sources"/>            description="Builds library jar from compiled sources">
194    
195        <mkdir dir="${build.lib.dir}"/>
196    
197        <jar destfile="${product.jar}">
198          <fileset dir="${build.classes.dir}"/>
199        </jar>
200    
201      </target>
202    
203    
204    
205    <target name="test"    <target name="test"
206            depends="init, check-junit, report-tests"            depends="init, configure-tests, report-tests"
207            description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />            description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
208    
209    
   <target name="checkstyle"  
           depends="filter-src"  
           description="Reports on style errors in Java source (verbose, mostly chaff)">  
210    
211      <taskdef resource="checkstyletask.properties"    <target name="docs"
212              classpath="${lib.dir}/checkstyle-all-2.4.jar"/>            description="Builds javadocs with custom tags to build folder">
213    
214        <delete dir="${build.javadocs.dir}"/>
215        <mkdir dir="${build.javadocs.dir}"/>
216    
217      <checkstyle>      <!-- the packagenames="none" hack below prevents scanning the -->
218        <formatter type="plain"/>  <!-- also available: type="xml" -->      <!-- sourcepath for packages -->
219        <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>  
220      </checkstyle>      <javadoc destdir="${build.javadocs.dir}"
221                 packagenames="none"
222                 link="${jdkapidocs.url}"
223                 overview="${src.dir}/intro.html"
224                 sourcepath="${src.dir}:${jdksrc.dir}"
225                 additionalparam="-XDignore.symbol.file=true" >
226          <fileset dir="${src.dir}" defaultexcludes="yes">
227            <include name="**/*.java"/>
228          </fileset>
229        </javadoc>
230    
231    </target>    </target>
232    
233    
   <target name="doccheck"  
           depends="filter-src"  
           description="Reports on javadoc style errors (not working yet)">  
234    
235      <delete dir="${build.doccheck.dir}"/>    <target name="dist"
236      <mkdir dir="${build.doccheck.dir}"/>            depends="init, dist-clean, dist-jar, dist-docs"
237              description="Puts all distributable products in single hierarchy"/>
238    
239      <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"  
240           docletpath="${lib.dir}/doccheck.jar"    <target name="release"
241              destdir="${build.doccheck.dir}">            depends="dist"
242        <packageset dir="${build.filter.src.dir}"/>            description="Puts entire CVS tree, plus distribution productions, in a jar">
243      </javadoc>  
244        <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
245    
246        <jar basedir="${basedir}" destfile="${release.jar}">
247          <!-- <exclude name="build/**"/> -->
248          <exclude name="${release.jar}"/>
249          <exclude name="user.properties"/>
250          <exclude name="etc/notes/**"/>
251          <exclude name="src/emulation/**"/>
252          <exclude name="**/SyntaxTest.java"/>
253          <exclude name="**/SuperfluousAbstract.java"/>
254        </jar>
255    
256    </target>    </target>
257    
258    
   <target name="docs"  
           depends="filter-src"  
           description="Builds javadocs with custom tags to build folder">  
259    
260      <delete dir="${build.javadocs.dir}"/>    <target name="clean"
261      <mkdir dir="${build.javadocs.dir}"/>            description="Removes all build products">
262    
263      <javadoc destdir="${build.javadocs.dir}"      <delete dir="${build.dir}"/>
264                  link="http://java.sun.com/j2se/1.4.1/docs/api"      <delete dir="${build.classes.dir}"/>
265              overview="${src.dir}/intro.html"      <delete dir="${build.lib.dir}"/>
               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:"/>  
266    
267        <packageset dir="${build.filter.src.dir}"/>    </target>
268    
269    
270    
271      <target name="dist-clean"
272              description="Removes all build and distribution products">
273    
274        <delete dir="${dist.dir}"/>
275    
276      </target>
277    
278    
279    
280      <target name="dist-docs"
281              description="Builds javadocs without custom tags to dist folder">
282    
283        <delete dir="${dist.javadocs.dir}"/>
284        <mkdir dir="${dist.javadocs.dir}"/>
285    
286        <!-- the packagenames="none" hack below prevents scanning the -->
287        <!-- sourcepath for packages -->
288    
289        <javadoc destdir="${dist.javadocs.dir}"
290                 packagenames="none"
291                 link="${jdkapidocs.url}"
292                 overview="${src.dir}/intro.html"
293                 sourcepath="${src.dir}:${jdksrc.dir}"
294                 additionalparam="-XDignore.symbol.file=true" >
295          <fileset dir="${src.dir}" defaultexcludes="yes">
296            <include name="**/*.java"/>
297          </fileset>
298      </javadoc>      </javadoc>
299    
300    </target>    </target>
301    
302    
   <!--  
    # javac -s doesn't reliably generate compilable code. It generates  
    # bridge methods (marked as "synthetic") that can have identical  
    # signatures to existing methods except for the return value.  
    -->  
   <target name="strip"  
           depends="init">  
303    
304      <mkdir dir="${build.stripped.dir}"/>    <!-- Internal targets -->
305    
306      <javac srcdir="${src.dir}"  
307            destdir="${build.stripped.dir}"    <target name="init">
308    
309        <!-- Version is kept in a separate file -->
310        <loadfile property="version" srcFile="version.properties"/>
311        <echo>Building JSR-166 version ${version}</echo>
312        <echo>java.home is ${java.home}</echo>
313    
314      </target>
315    
316    
317      <target name="dist-jar"
318              depends="clean, jar">
319    
320        <copy file="${product.jar}" todir="${dist.dir}"/>
321    
322      </target>
323    
324    
325      <target name="compile-tests"
326              depends="jar">
327    
328        <mkdir dir="${build.testcases.dir}"/>
329    
330        <javac srcdir="${tck.src.dir}"
331              destdir="${build.testcases.dir}"
332                debug="${build.debug}"
333           debuglevel="${build.debuglevel}"
334          deprecation="${build.deprecation}"
335               source="${build.sourcelevel}"
336                 fork="true">
337    
338          <compilerarg value="${bootclasspath.args}"/>
339          <compilerarg line="${build.args}"/>
340          <compilerarg value="-XDignore.symbol.file=true"/>
341    
342          <classpath refid="test.classpath"/>
343    
344        </javac>
345    
346        <javac srcdir="${test.src.dir}"
347              destdir="${build.testcases.dir}"
348                debug="${build.debug}"
349           debuglevel="${build.debuglevel}"
350          deprecation="${build.deprecation}"
351               source="${build.sourcelevel}"
352                 fork="true">
353    
354          <include name="jsr166/test/**"/>
355    
356          <compilerarg value="${bootclasspath.args}"/>
357          <compilerarg line="${build.args}"/>
358          <compilerarg value="-XDignore.symbol.file=true"/>
359    
360          <classpath refid="test.classpath"/>
361    
362        </javac>
363    
364    <!--
365        <javac srcdir="${jtreg.src.dir}"
366              destdir="${build.testcases.dir}"
367              debug="${build.debug}"              debug="${build.debug}"
368         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
369        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
370             source="${build.sourcelevel}"             source="${build.sourcelevel}"
371               fork="true">               fork="true">
372    
373        <bootclasspath refid="javac.bootclasspath"/>        <compilerarg value="${bootclasspath.args}"/>
374        <compilerarg line="${javac.args} ${build.warnings.option} -s"/>        <compilerarg line="${build.args}"/>
375          <compilerarg value="-XDignore.symbol.file=true"/>
376    
377          <classpath refid="test.classpath"/>
378    
379      </javac>      </javac>
380    -->
381    
382    </target>    </target>
383    
384    
385    <target name="dist"    <target name="run-tests"
386            depends="init, dist-clean, dist-jar, dist-docs"            depends="compile-tests">
387    
388        <!-- May be overridden by user.properties -->
389        <property name="testcase" value="*"/>
390    
391        <mkdir dir="${build.reports.dir}"/>
392    
393        <junit printsummary="true"
394                 showoutput="true"
395              errorProperty="junit.failed"
396            failureProperty="junit.failed"
397                        dir="${build.reports.dir}"
398                       fork="true">
399    
400          <jvmarg value="${bootclasspath.args}"/>
401          <jvmarg value="-server"/>
402          <jvmarg value="-showversion"/>
403    
404          <classpath refid="test.classpath"/>
405    
406          <formatter type="xml"/>
407    
408          <batchtest todir="${build.reports.dir}" unless="no.test.tck">
409            <fileset dir="${tck.src.dir}">
410              <include name="**/${testcase}Test.java"/>
411            </fileset>
412          </batchtest>
413    
414          <batchtest todir="${build.reports.dir}" if="do.test.old">
415            <fileset dir="${test.src.dir}">
416              <include name="jsr166/test/**/${testcase}Test.java"/>
417            </fileset>
418          </batchtest>
419    
420    <!--
421          <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
422            <fileset dir="${jtreg.src.dir}">
423              <include name="**/${testcase}Test.java"/>
424            </fileset>
425          </batchtest>
426    -->
427    
428        </junit>
429    
430      </target>
431    
432    
433      <target name="report-tests"
434              depends="run-tests">
435    
436        <!-- Sets junit.report.format to frames if redirection is present,
437             otherwise sets it to noframes. -->
438        <available property="junit.report.format"
439                      value="frames"
440                  classname="org.apache.xalan.lib.Redirect"
441        />
442        <property name="junit.report.format" value="noframes"/>
443    
444        <junitreport todir="${build.reports.dir}">
445          <fileset dir="${build.reports.dir}">
446            <include name="TEST-*.xml"/>
447          </fileset>
448          <report format="${junit.report.format}" todir="${build.reports.dir}"
449          />
450        </junitreport>
451    
452        <fail message="Test Cases Failed" if="junit.failed"/>
453    
454      </target>
455    
456    
457      <target name="configure-compiler">
458    
459        <property name="unchecked.option" value="-Xlint:unchecked"/>
460    
461        <condition property="warnunchecked.arg" value="${unchecked.option}">
462          <istrue value="${build.warnunchecked}"/>
463        </condition>
464    
465        <property name="warnunchecked.arg" value=""/>
466    
467    
468        <!-- Common options in javac invocations -->
469        <property name="build.args" value="${warnunchecked.arg}"/>
470    
471      </target>
472    
473    
474      <target name="configure-tests"
475           depends="configure-compiler">
476    
477        <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
478        <available property="junit.available"
479                   classname="junit.framework.Protectable"/>
480    
481        <!-- Xalan -->
482        <available property="xalan.available"
483                   classname="org.apache.xalan.Version"/>
484    
485    
486        <!-- Ant 1.6beta and later don't need or want this check -->
487        <!--
488        <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
489              unless="junit.available"/>
490    
491        <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"
492              unless="xalan.available"/>
493        -->
494    
495      </target>
496    
497    
498      <!-- Various demos and test programs -->
499    
500    
501      <target name="loops" depends="init, configure-compiler"
502              description="Benchmark from Doug Lea's AQS paper">
503    
504        <mkdir dir="${build.loops.dir}"/>
505    
506        <javac srcdir="${loops.src.dir}"
507              destdir="${build.loops.dir}"
508                debug="${build.debug}"
509           debuglevel="${build.debuglevel}"
510          deprecation="${build.deprecation}"
511               source="${build.sourcelevel}"
512                 fork="true">
513    
514          <compilerarg line="${build.args}"/>
515          <classpath refid="loops.classpath"/>
516          <compilerarg value="-XDignore.symbol.file=true"/>
517    
518        </javac>
519    
520        <java classname="ALoops" fork="true">
521          <classpath refid="loops.classpath"/>
522        </java>
523    
524      </target>
525    
526    
527      <!-- jdk7 -->
528    
529    
530      <target name="jdk7compile"
531              depends="configure-compiler"
532              description="Compiles src/jdk7 sources">
533    
534        <mkdir dir="${build.jdk7.classes.dir}"/>
535    
536        <javac srcdir="${jdk7src.dir}"
537               destdir="${build.jdk7.classes.dir}"
538               debug="${build.debug}"
539               debuglevel="${build.debuglevel}"
540               deprecation="${build.deprecation}"
541               source="1.6"
542               classpath=""
543               bootclasspath="${bootclasspath6}"
544               includeAntRuntime="false"
545               includeJavaRuntime="false"
546               executable="${javac7}"
547               fork="true">
548    
549          <include name="**/*.java"/>
550          <compilerarg line="${build.args}"/>
551          <compilerarg value="-XDignore.symbol.file=true"/>
552          <compilerarg value="-Xlint:all"/>
553    
554        </javac>
555    
556        <mkdir dir="${build.jdk7.lib.dir}"/>
557    
558        <jar destfile="${jdk7product.jar}" index="true">
559          <fileset dir="${build.jdk7.classes.dir}"/>
560        </jar>
561    
562        <mkdir dir="${build.jdk7.tck.classes.dir}"/>
563    
564        <javac srcdir="${tck.src.dir}"
565               destdir="${build.jdk7.tck.classes.dir}"
566               debug="${build.debug}"
567               debuglevel="${build.debuglevel}"
568               deprecation="${build.deprecation}"
569               source="1.6"
570               classpath="${junit.jar}"
571               bootclasspath="${jdk7product.jar}:${bootclasspath6}"
572               includeAntRuntime="false"
573               includeJavaRuntime="false"
574               executable="${javac7}"
575               fork="true">
576    
577          <include name="**/*.java"/>
578          <compilerarg line="${build.args}"/>
579          <compilerarg value="-XDignore.symbol.file=true"/>
580          <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
581    
582        </javac>
583    
584      </target>
585    
586    
587      <target name="run-jdk7-tck-tests"
588              depends="jdk7compile"
589              description="Runs tck tests for jsr166-jdk7 directly">
590        <run-tck-tests
591          jvm="${java7}"
592          tck.classes="${build.jdk7.tck.classes.dir}"
593          product.jar="${jdk7product.jar}"/>
594      </target>
595    
596    
597      <target name="run-jdk7-tck-tests-via-junit-task"
598              depends="jdk7compile">
599    
600        <junit printsummary="true"
601               showoutput="true"
602               errorProperty="junit.failed"
603               failureProperty="junit.failed"
604               includeantruntime="true"
605               jvm="${java7}"
606               fork="true">
607    
608          <jvmarg value="-Xbootclasspath/p:${jdk7product.jar}"/>
609          <jvmarg value="-server"/>
610    
611          <classpath>
612            <pathelement location="${junit.jar}"/>
613            <pathelement location="${build.jdk7.tck.classes.dir}"/>
614          </classpath>
615    
616          <formatter type="brief"/>
617    
618          <test name="JSR166TestCase" haltonfailure="no">
619          </test>
620    
621        </junit>
622      </target>
623    
624    
625      <target name="jdk7docs"
626              description="Builds javadocs with custom tags to build folder">
627    
628        <delete dir="${build.jdk7.docs.dir}"/>
629        <mkdir dir="${build.jdk7.docs.dir}"/>
630    
631        <javadoc destdir="${build.jdk7.docs.dir}"
632                 packagenames="none"
633                 link="${jdkapi7docs.url}"
634                 overview="${jdk7src.dir}/intro.html"
635                 sourcepath="${jdk7src.dir}"
636                 bootclasspath="${bootclasspath6}"
637                 classpath=""
638                 source="1.6"
639                 executable="${javadoc7}"
640                 additionalparam="-XDignore.symbol.file=true" >
641          <fileset dir="${jdk7src.dir}" defaultexcludes="yes">
642            <include name="**/*.java"/>
643          </fileset>
644        </javadoc>
645    
646      </target>
647    
648    
649      <target name="jdk7dist"
650              depends="jdk7dist-clean, jdk7dist-jar, jdk7dist-docs"
651            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
652    
653    
654    <target name="clean"  
655      <target name="jdk7clean"
656            description="Removes all build products">            description="Removes all build products">
657    
658      <delete dir="${build.dir}"/>      <delete dir="${build.jdk7.dir}"/>
     <delete dir="${build.classes.dir}"/>  
     <delete dir="${build.lib.dir}"/>  
659    
660    </target>    </target>
661    
662    
663    <target name="dist-clean"  
664      <target name="jdk7dist-clean"
665            description="Removes all build and distribution products">            description="Removes all build and distribution products">
666    
667      <delete dir="${dist.dir}"/>    </target>
668    
669      <target name="jdk7dist-docs"
670              description="Builds javadocs without custom tags to dist folder">
671    
672        <delete dir="${dist.jdk7.docs.dir}"/>
673        <mkdir dir="${dist.jdk7.docs.dir}"/>
674    
675        <javadoc destdir="${dist.jdk7.docs.dir}"
676                 packagenames="none"
677                 link="${jdkapi7docs.url}"
678                 overview="${jdk7src.dir}/intro.html"
679                 sourcepath="${jdk7src.dir}"
680                 classpath=""
681                 executable="${javadoc7}"
682                 bootclasspath="${bootclasspath6}"
683                 source="1.6">
684          <arg value="-XDignore.symbol.file=true"/>
685          <fileset dir="${jdk7src.dir}" defaultexcludes="yes">
686            <include name="**/*.java"/>
687          </fileset>
688        </javadoc>
689    
690    </target>    </target>
691    
692      <target name="jdk7dist-jar"
693              depends="jdk7clean, jdk7compile">
694    
695    <target name="dist-docs"      <copy file="${jdk7product.jar}" todir="${dist.dir}"/>
           depends="filter-src"  
           description="Builds javadocs without custom tags to dist folder">  
696    
697      <delete dir="${dist.javadocs.dir}"/>    </target>
     <mkdir dir="${dist.javadocs.dir}"/>  
698    
699      <javadoc destdir="${dist.javadocs.dir}"    <!-- jsr166x -->
                 link="http://java.sun.com/j2se/1.4.1/docs/api"  
             overview="${src.dir}/intro.html"  
               source="${build.docsourcelevel}">  
700    
       <packageset dir="${build.filter.src.dir}"/>  
701    
702      </javadoc>    <target name="jsr166xcompile"
703              depends="init, configure-compiler"
704              description="Compiles jsr166x sources">
705    
706        <mkdir dir="${build.jsr166x.dir}"/>
707    
708        <javac srcdir="${jsr166xsrc.dir}"
709              destdir="${build.jsr166x.dir}"
710                debug="${build.debug}"
711           debuglevel="${build.debuglevel}"
712          deprecation="${build.deprecation}"
713               source="${build.sourcelevel}"
714                 fork="true">
715    
716          <include name="**/*.java"/>
717          <compilerarg line="${build.args}"/>
718          <compilerarg value="-XDignore.symbol.file=true"/>
719    
720        </javac>
721    
722    </target>    </target>
723    
724    
725    
726    <!-- Internal targets -->    <target name="jsr166xjar"
727              depends="jsr166xcompile"
728              description="Builds library jar from compiled sources">
729    
730    <target name="set-warnings-if" if="build.warnings">      <mkdir dir="${build.jsr166xlib.dir}"/>
731    
732      <property name="build.warnings.option" value="-warnunchecked"/>      <jar destfile="${jsr166xproduct.jar}">
733          <fileset dir="${build.jsr166x.dir}"/>
734        </jar>
735    
736    </target>    </target>
737    
738    
   <target name="set-warnings-unless" unless="build.warnings">  
739    
740      <property name="build.warnings.option" value=""/>    <target name="jsr166xdocs"
741              description="Builds javadocs with custom tags to build folder">
742    
743        <delete dir="${build.jsr166xjavadocs.dir}"/>
744        <mkdir dir="${build.jsr166xjavadocs.dir}"/>
745    
746        <javadoc destdir="${build.jsr166xjavadocs.dir}"
747                 packagenames="jsr166x"
748                 link="${jdkapidocs.url}"
749                 source="${build.sourcelevel}"
750                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
751                 additionalparam="-XDignore.symbol.file=true" />
752    
753    </target>    </target>
754    
755    
756    <target name="init"    <target name="jsr166xdist"
757            depends="set-warnings-if, set-warnings-unless">            depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs"
758              description="Puts all distributable products in single hierarchy"/>
759    
760      <!-- Version is kept in a separate file -->  
761      <loadfile property="version" srcFile="version.properties"/>  
762      <echo>Building JSR-166 version ${version}</echo>    <target name="jsr166xclean"
763              description="Removes all build products">
764    
765        <delete dir="${build.jsr166x.dir}"/>
766        <delete dir="${build.jsr166xlib.dir}"/>
767    
768    </target>    </target>
769    
770    
   <target name="init-jar">  
771    
772      <mkdir dir="${build.lib.dir}"/>    <target name="jsr166xdist-clean"
773              description="Removes all build and distribution products">
774    
775    </target>    </target>
776    
777    
   <target name="native-jar"  
           depends="compile, init-jar"  
           unless="build.emulation">  
778    
779      <jar destfile="${product.jar}">    <target name="jsr166xdist-docs"
780        <fileset dir="${build.classes.dir}"/>            description="Builds javadocs without custom tags to dist folder">
781      </jar>  
782        <delete dir="${dist.jsr166xjavadocs.dir}"/>
783        <mkdir dir="${dist.jsr166xjavadocs.dir}"/>
784    
785        <javadoc destdir="${dist.jsr166xjavadocs.dir}"
786                 packagenames="jsr166x"
787                 link="${jdkapidocs.url}"
788                 source="${build.sourcelevel}"
789                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
790                 additionalparam="-XDignore.symbol.file=true" />
791    
792    </target>    </target>
793    
794      <target name="jsr166xdist-jar"
795              depends="jsr166xclean, jsr166xjar">
796    
797    <target name="base-jar"      <copy file="${jsr166xproduct.jar}" todir="${dist.dir}"/>
           depends="compile, init-jar">  
798    
799    </target>    </target>
800    
801      <!-- jsr166y -->
802    
   <target name="compile-emulation"  
           depends="init"  
           if="build.emulation">  
803    
804      <mkdir dir="${build.emulation.dir}"/>    <target name="jsr166ycompile"
805              depends="init, configure-compiler"
806              description="Compiles jsr166y sources">
807    
808      <javac srcdir="${emulation.src.dir}"      <mkdir dir="${build.jsr166y.dir}"/>
809            destdir="${build.emulation.dir}"  
810        <javac srcdir="${jsr166ysrc.dir}"
811              destdir="${build.jsr166y.dir}"
812              debug="${build.debug}"              debug="${build.debug}"
813         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
814        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
815             source="${build.sourcelevel}"             source="${build.sourcelevel}"
816               fork="true">               fork="true">
817    
818        <bootclasspath refid="javac.bootclasspath"/>        <include name="**/*.java"/>
819        <compilerarg line="${javac.args} ${build.warnings.option}"/>        <compilerarg line="${build.args}"/>
820          <compilerarg value="-XDignore.symbol.file=true"/>
821          <compilerarg value="${bootclasspath.args}"/>
822    
823    <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
824    
825      </javac>      </javac>
826    
827    </target>    </target>
828    
829    
   <target name="emulation-jar"  
           depends="init-jar, compile-emulation"  
           if="build.emulation">  
830    
831      <target name="jsr166yjar"
832              depends="jsr166ycompile"
833              description="Builds library jar from compiled sources">
834    
835      <jar destfile="${product.jar}" duplicate="add">      <mkdir dir="${build.jsr166ylib.dir}"/>
836        <fileset dir="${build.classes.dir}">  
837          <patternset refid="emulation.excludes"/>      <jar destfile="${jsr166yproduct.jar}" index="true">
838        </fileset>        <fileset dir="${build.jsr166y.dir}"/>
       <fileset dir="${build.emulation.dir}"/>  
839      </jar>      </jar>
840    
841    </target>    </target>
842    
843    
   <target name="dist-jar"  
           depends="clean, jar">  
844    
845      <copy file="${product.jar}" todir="${dist.dir}"/>    <target name="jsr166ydocs"
846              description="Builds javadocs with custom tags to build folder">
847    
848        <delete dir="${build.jsr166yjavadocs.dir}"/>
849        <mkdir dir="${build.jsr166yjavadocs.dir}"/>
850    
851        <javadoc destdir="${build.jsr166yjavadocs.dir}"
852                 packagenames="jsr166y"
853                 link="${jdkapidocs.url}"
854                 source="${build.sourcelevel}"
855                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
856                 additionalparam="-XDignore.symbol.file=true" />
857    
858    </target>    </target>
859    
860    
861    <target name="compile-ant-filter"    <target name="jsr166ydist"
862            depends="init">            depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydist-docs"
863              description="Puts all distributable products in single hierarchy"/>
864    
     <mkdir dir="${build.ant.dir}"/>  
865    
866      <javac srcdir="${ant.src.dir}"  
867            destdir="${build.ant.dir}"    <target name="jsr166yclean"
868             source="1.4"            description="Removes all build products">
869      />  
870        <delete dir="${build.jsr166y.dir}"/>
871        <delete dir="${build.jsr166ylib.dir}"/>
872    
873    </target>    </target>
874    
875    
   <target name="filter-src"  
           depends="compile-ant-filter">  
876    
877      <mkdir dir="${build.filter.src.dir}"/>    <target name="jsr166ydist-clean"
878              description="Removes all build and distribution products">
879    
880      <copy todir="${build.filter.src.dir}">    </target>
881        <fileset dir="${src.dir}">  
882          <patternset refid="emulation.excludes"/>    <target name="jsr166ydist-docs"
883        </fileset>            description="Builds javadocs without custom tags to dist folder">
884        <filterchain>  
885          <filterreader classname="jsr166.ant.filters.ReplaceFilter"      <delete dir="${dist.jsr166yjavadocs.dir}"/>
886                        classpath="${build.ant.dir}">      <mkdir dir="${dist.jsr166yjavadocs.dir}"/>
887            <!--  
888             # These arguments are to get rid of angle-bracketed type      <javadoc destdir="${dist.jsr166yjavadocs.dir}"
889             # parameters so that javadoc can run on the result. The               packagenames="jsr166y"
890             # following heuristic that seems to work:               link="${jdkapidocs.url}"
891             #               source="${build.sourcelevel}"
892             # For all lines not starting with space(s)-asterisk-space(s),               sourcepath="${topsrc.dir}:${jdksrc.dir}"
893             #   replace <something> with a space, where there may be more               additionalparam="-XDignore.symbol.file=true" />
            #   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>  
894    
895    </target>    </target>
896    
897      <target name="jsr166ydist-jar"
898              depends="jsr166yclean, jsr166yjar">
899    
900    <target name="compile-tests"      <copy file="${jsr166yproduct.jar}" todir="${dist.dir}"/>
           depends="jar">  
901    
902      <mkdir dir="${build.testcases.dir}"/>    </target>
903    
904      <javac srcdir="${test.src.dir}"  
905            destdir="${build.testcases.dir}"    <!-- extra166y -->
906    
907    
908      <target name="extra166ycompile"
909              depends="init, configure-compiler, jsr166ycompile"
910              description="Compiles extra166y sources">
911    
912        <mkdir dir="${build.extra166y.dir}"/>
913    
914        <javac srcdir="${extra166ysrc.dir}"
915              destdir="${build.extra166y.dir}"
916              debug="${build.debug}"              debug="${build.debug}"
917                classpath="${jsr166yproduct.jar}"
918         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
919        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
920             source="${build.sourcelevel}"             source="${build.sourcelevel}"
921               fork="true">               fork="true">
922    
923        <bootclasspath refid="javac.bootclasspath"/>        <include name="**/*.java"/>
924        <compilerarg line="${javac.args} ${build.warnings.option}"/>        <compilerarg line="${build.args}"/>
925        <classpath refid="test.classpath"/>        <compilerarg value="-XDignore.symbol.file=true"/>
926          <compilerarg value="${bootclasspath.args}"/>
927    
928    <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
929    
930      </javac>      </javac>
931    
932    </target>    </target>
933    
934    
   <target name="run-tests"  
           depends="compile-tests">  
935    
936      <!-- May be overridden by user.properties -->    <target name="extra166yjar"
937      <property name="testcase" value="*"/>            depends="extra166ycompile"
938              description="Builds library jar from compiled sources">
939    
940      <mkdir dir="${build.reports.dir}"/>      <mkdir dir="${build.extra166ylib.dir}"/>
941    
942      <junit printsummary="true"      <jar destfile="${extra166yproduct.jar}" index="true">
943               showoutput="true"        <fileset dir="${build.extra166y.dir}"/>
944            errorProperty="junit.failed"      </jar>
         failureProperty="junit.failed"  
                     dir="${build.reports.dir}"  
                    fork="true">  
945    
946        <jvmarg value="${test.javac.args}"/>    </target>
947    
       <formatter type="xml"/>  
948    
       <batchtest todir="${build.reports.dir}">  
         <fileset dir="${test.src.dir}">  
           <include name="**/${testcase}Test.java"/>  
         </fileset>  
       </batchtest>  
949    
950      </junit>    <target name="extra166ydocs"
951              description="Builds javadocs with custom tags to build folder">
952    
953        <delete dir="${build.extra166yjavadocs.dir}"/>
954        <mkdir dir="${build.extra166yjavadocs.dir}"/>
955    
956        <javadoc destdir="${build.extra166yjavadocs.dir}"
957                 packagenames="extra166y"
958                 link="${jdkapidocs.url}"
959                 source="${build.sourcelevel}"
960                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
961                 additionalparam="-XDignore.symbol.file=true" />
962    
963    </target>    </target>
964    
965    
966    <target name="report-tests"    <target name="extra166ydist"
967            depends="run-tests">            depends="extra166ydist-clean, extra166ydist-jar, extra166ydist-docs"
968              description="Puts all distributable products in single hierarchy"/>
969    
     <!-- Sets junit.report.format to frames if Xalan is present,  
          otherwise sets it to noframes. -->  
     <available property="junit.report.format"  
                   value="frames"  
               classname="org.apache.xalan.lib.Redirect"  
     />  
     <property name="junit.report.format" value="noframes"/>  
970    
     <junitreport todir="${build.reports.dir}">  
       <fileset dir="${build.reports.dir}">  
         <include name="TEST-*.xml"/>  
       </fileset>  
       <report styledir="${stylesheet.dir}"  
                 format="${junit.report.format}"  
                  todir="${build.reports.dir}"  
       />  
     </junitreport>  
971    
972      <fail message="Test Cases Failed" if="junit.failed"/>    <target name="extra166yclean"
973              description="Removes all build products">
974    
975        <delete dir="${build.extra166y.dir}"/>
976        <delete dir="${build.extra166ylib.dir}"/>
977    
978    </target>    </target>
979    
980    
   <target name="check-junit">  
981    
982      <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->    <target name="extra166ydist-clean"
983      <available property="junit.available"            description="Removes all build and distribution products">
984                 classname="junit.framework.Protectable"/>  
985      </target>
986    
987      <target name="extra166ydist-docs"
988              description="Builds javadocs without custom tags to dist folder">
989    
990        <delete dir="${dist.extra166yjavadocs.dir}"/>
991        <mkdir dir="${dist.extra166yjavadocs.dir}"/>
992    
993        <javadoc destdir="${dist.extra166yjavadocs.dir}"
994                 packagenames="extra166y"
995                 link="${jdkapidocs.url}"
996                 source="${build.sourcelevel}"
997                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
998                 additionalparam="-XDignore.symbol.file=true" />
999    
1000      </target>
1001    
1002      <target name="extra166ydist-jar"
1003              depends="extra166yclean, extra166yjar">
1004    
1005        <copy file="${extra166yproduct.jar}" todir="${dist.dir}"/>
1006    
1007      </target>
1008    
1009      <!-- jsr166e -->
1010    
1011      <target name="jsr166ecompile"
1012              depends="configure-compiler"
1013              description="Compiles jsr166e sources">
1014    
1015        <mkdir dir="${build.jsr166e.dir}"/>
1016    
1017        <javac srcdir="${topsrc.dir}"
1018               destdir="${build.jsr166e.dir}"
1019               debug="${build.debug}"
1020               debuglevel="${build.debuglevel}"
1021               deprecation="${build.deprecation}"
1022               source="1.7"
1023               classpath=""
1024               includeAntRuntime="false"
1025               includeJavaRuntime="false"
1026               executable="${javac7}"
1027               fork="true">
1028    
1029          <include name="jsr166e/**/*.java"/>
1030          <compilerarg line="${build.args}"/>
1031          <compilerarg value="-XDignore.symbol.file=true"/>
1032          <compilerarg value="-Xlint:all"/>
1033    
1034        </javac>
1035    
1036      </target>
1037    
1038    
1039      <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"  
1040            unless="junit.available"/>    <target name="jsr166ejar"
1041              depends="jsr166ecompile"
1042              description="Builds library jar from compiled sources">
1043    
1044        <mkdir dir="${build.jsr166elib.dir}"/>
1045    
1046        <jar destfile="${jsr166eproduct.jar}" index="true">
1047          <fileset dir="${build.jsr166e.dir}"/>
1048        </jar>
1049    
1050      </target>
1051    
1052    
1053    
1054      <target name="jsr166edocs"
1055              description="Builds javadocs with custom tags to build folder">
1056    
1057        <delete dir="${build.jsr166ejavadocs.dir}"/>
1058        <mkdir dir="${build.jsr166ejavadocs.dir}"/>
1059    
1060        <javadoc destdir="${build.jsr166ejavadocs.dir}"
1061                 packagenames="jsr166e,jsr166e.extra"
1062                 link="${jdkapi7docs.url}"
1063                 source="1.7"
1064                 sourcepath="${topsrc.dir}:${jdk7src.dir}:${jdksrc.dir}"
1065                 executable="${javadoc7}"
1066                 additionalparam="-XDignore.symbol.file=true" >
1067          <fileset dir="${topsrc.dir}" defaultexcludes="yes">
1068            <include name="jsr166e/**/*.java"/>
1069          </fileset>
1070        </javadoc>
1071    
1072    </target>    </target>
1073    
1074    
1075      <target name="jsr166edist"
1076              depends="jsr166edist-clean, jsr166edist-jar, jsr166edist-docs"
1077              description="Puts all distributable products in single hierarchy"/>
1078    
1079    
1080    
1081      <target name="jsr166eclean"
1082              description="Removes all build products">
1083    
1084        <delete dir="${build.jsr166e.dir}"/>
1085        <delete dir="${build.jsr166elib.dir}"/>
1086    
1087      </target>
1088    
   <!-- Anthill targets -->  
1089    
   <target name="anthill-build"  
           depends="jar, test, docs, dist-docs"/>  
1090    
1091    <target name="anthill-publish">    <target name="jsr166edist-clean"
1092              description="Removes all build and distribution products">
1093    
1094      <copy todir="${deployDir}/docs/private">    </target>
       <fileset dir="${build.javadocs.dir}"/>  
     </copy>  
1095    
1096      <copy todir="${deployDir}/docs/public">    <target name="jsr166edist-docs"
1097        <fileset dir="${dist.javadocs.dir}"/>            description="Builds javadocs without custom tags to dist folder">
     </copy>  
1098    
1099      <copy tofile="${deployDir}/index.html"      <delete dir="${dist.jsr166ejavadocs.dir}"/>
1100            file="${basedir}/etc/anthill-index.html"/>      <mkdir dir="${dist.jsr166ejavadocs.dir}"/>
1101    
1102      <copy todir="${deployDir}/notes">      <javadoc destdir="${dist.jsr166ejavadocs.dir}"
1103        <fileset dir="${basedir}/etc/notes"/>               packagenames="jsr166e,jsr166e.extra"
1104      </copy>               link="${jdkapidocs.url}"
1105                 source="1.7"
1106                 sourcepath="${topsrc.dir}:${jdksrc.dir}"
1107                 additionalparam="-XDignore.symbol.file=true" />
1108    
1109    </target>    </target>
1110    
1111      <target name="jsr166edist-jar"
1112              depends="jsr166eclean, jsr166ejar">
1113    
1114        <copy file="${jsr166eproduct.jar}" todir="${dist.dir}"/>
1115    
1116      </target>
1117    
1118  </project>  </project>

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.97

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