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

Diff of /jsr166/build.xml

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

revision 1.216, Tue Aug 30 00:01:22 2016 UTC revision 1.258, Tue Oct 31 17:47:57 2017 UTC
# Line 1  Line 1 
1  <project name="jsr166" default="usage"  <project name="jsr166" default="usage"
2    xmlns:if="ant:if" xmlns:unless="ant:unless">    xmlns:if="ant:if" xmlns:unless="ant:unless"
3      xmlns:ivy="antlib:org.apache.ivy.ant">
4    
5    <description>    <description>
6  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
# Line 17  Line 18 
18    itself.  Because the JDK version matters and because different    itself.  Because the JDK version matters and because different
19    targets require different JDKs, we assume that users have created a    targets require different JDKs, we assume that users have created a
20    hierarchy containing:    hierarchy containing:
   $HOME/jdk/jdk6  
   $HOME/jdk/jdk7  
21    $HOME/jdk/jdk8    $HOME/jdk/jdk8
22    $HOME/jdk/jdk9    $HOME/jdk/jdk9
23      $HOME/jdk/jdk10
24    where each of the above is a JDK or a symlink to same, and    where each of the above is a JDK or a symlink to same, and
   $HOME/jdk/src/jdk6  
   $HOME/jdk/src/jdk7  
25    $HOME/jdk/src/jdk8    $HOME/jdk/src/jdk8
26    $HOME/jdk/src/jdk9    $HOME/jdk/src/jdk9
27      $HOME/jdk/src/jdk10
28    where each of the above is a complete JDK source tree    where each of the above is a complete JDK source tree
29    (e.g. mercurial forest) or a symlink to same.    (e.g. mercurial forest) or a symlink to same.
30    
31    Alternatively, define ant variables thus:    Alternatively, define ant variables thus:
32    ant -Djdk$N.home=... -Djdk$N.src.home=...    ant -Djdk$N.home=... -Djdk$N.src.home=...
33    for $N in 6 7 8 9 ...    for $N in 8 9 10 ...
34    
35    As of 2016-03, the sources in src/main are for jdk9+ only.  The "docs"    As of 2016-03, the sources in src/main are for jdk9+ only.
   target is currently broken.  
36  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
37    </description>    </description>
38    
# Line 63  Line 61 
61    <property name="build.classes.dir"           location="${build.dir}/classes"/>    <property name="build.classes.dir"           location="${build.dir}/classes"/>
62    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>
63    <property name="build.loops.dir"             location="${build.dir}/loops"/>    <property name="build.loops.dir"             location="${build.dir}/loops"/>
   <property name="build.reports.dir"           location="${build.dir}/reports"/>  
64    
65    <property name="build.4jdk7.dir"             location="${build.dir}/jsr166-4jdk7"/>    <property name="build.4jdk7.dir"             location="${build.dir}/jsr166-4jdk7"/>
66    <property name="build.4jdk7.classes.dir"     location="${build.4jdk7.dir}/classes"/>    <property name="build.4jdk7.classes.dir"     location="${build.4jdk7.dir}/classes"/>
# Line 134  Line 131 
131    <defjdklocations v="7"/>    <defjdklocations v="7"/>
132    <defjdklocations v="8"/>    <defjdklocations v="8"/>
133    <defjdklocations v="9"/>    <defjdklocations v="9"/>
134      <defjdklocations v="10"/>
135    
136    <!-- Source locations -->    <!-- Source locations -->
137    <property name="src.dir"              location="${basedir}/src/main"/>    <property name="src.dir"              location="${basedir}/src/main"/>
# Line 143  Line 141 
141    <property name="jtreg7.src.dir"       location="${test.src.dir}/jtreg-jdk7"/>    <property name="jtreg7.src.dir"       location="${test.src.dir}/jtreg-jdk7"/>
142    <property name="jtreg8.src.dir"       location="${test.src.dir}/jtreg-jdk8"/>    <property name="jtreg8.src.dir"       location="${test.src.dir}/jtreg-jdk8"/>
143    <property name="jtreg9.src.dir"       location="${test.src.dir}/jtreg"/>    <property name="jtreg9.src.dir"       location="${test.src.dir}/jtreg"/>
144      <property name="jtreg10.src.dir"      location="${test.src.dir}/jtreg"/>
145    <property name="jtreg.src.dir"        location="${jtreg9.src.dir}"/>    <property name="jtreg.src.dir"        location="${jtreg9.src.dir}"/>
146    <property name="lib.dir"              location="${basedir}/lib"/>    <property name="lib.dir"              location="${basedir}/lib"/>
147    <property name="dist.dir"             location="${basedir}/dist"/>    <property name="dist.dir"             location="${basedir}/dist"/>
# Line 182  Line 181 
181    <property name="junit.jar"        location="${lib.dir}/junit.jar"/>    <property name="junit.jar"        location="${lib.dir}/junit.jar"/>
182    
183    <!-- Canonical location of jdk docs root, to use with javadoc -Xdocrootparent flag -->    <!-- Canonical location of jdk docs root, to use with javadoc -Xdocrootparent flag -->
184    <property name="java5.docroot.url"      value="http://docs.oracle.com/javase/1.5.0/docs"/>    <!-- Switched to https: in 2017-10 - JDK-8190312 -->
185    <property name="java6.docroot.url"      value="http://docs.oracle.com/javase/6/docs"/>    <property name="java5.docroot.url"  value="https://docs.oracle.com/javase/1.5.0/docs"/>
186    <property name="java7.docroot.url"      value="http://docs.oracle.com/javase/7/docs"/>    <property name="java6.docroot.url"  value="https://docs.oracle.com/javase/6/docs"/>
187    <property name="java8.docroot.url"      value="http://docs.oracle.com/javase/8/docs"/>    <property name="java7.docroot.url"  value="https://docs.oracle.com/javase/7/docs"/>
188    <!-- The expected canonical location does not yet exist as of 2016-04 -->    <property name="java8.docroot.url"  value="https://docs.oracle.com/javase/8/docs"/>
189    <!-- <property name="java9.docroot.url" value="http://docs.oracle.com/javase/9/docs"/> -->    <property name="java9.docroot.url"  value="https://docs.oracle.com/javase/9/docs"/>
190    <property name="java9.docroot.url"      value="http://download.java.net/java/jdk9/docs"/>    <!-- The location of jdk9 early access docs (RIP) -->
191      <!-- <property name="java9.docroot.url" value="http://download.java.net/java/jdk9/docs"/> -->
192    <!-- Default jdk doc location (latest stable release seems best) -->    <!-- Default jdk doc location (latest stable release seems best) -->
193    <property name="java.docroot.url"       value="${java8.docroot.url}"/>    <property name="java.docroot.url"   value="${java9.docroot.url}"/>
194    
195    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
196    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>
# Line 233  Line 233 
233        <available file="${jdk@{compile-target}.home}/jmods" type="dir"/>        <available file="${jdk@{compile-target}.home}/jmods" type="dir"/>
234      </condition>      </condition>
235    
236        <local name="use-doclint"/>
237        <condition property="use-doclint">
238          <not> <equals arg1="@{target}" arg2="7"/> </not>
239        </condition>
240    
241      <mkdir dir="@{workdir}/tck-classes"/>      <mkdir dir="@{workdir}/tck-classes"/>
242    
243      <javac srcdir="@{tck.src.dir}"      <javac srcdir="@{tck.src.dir}"
# Line 245  Line 250 
250             classpath="${junit.jar}"             classpath="${junit.jar}"
251             includeAntRuntime="false"             includeAntRuntime="false"
252             includeJavaRuntime="false"             includeJavaRuntime="false"
253               encoding="ASCII"
254             executable="${javac@{compile-target}}"             executable="${javac@{compile-target}}"
255             fork="true">             fork="true">
256    
257        <include name="*.java"/>        <include name="*.java"/>
258        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
259        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>
260          <compilerarg value="-Xdoclint:reference/private" if:set="use-doclint"/>
261        <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>        <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
262        <compilerarg value="-Xpatch:java.base=${build.classes.dir}/java.base" if:set="modules"/>        <compilerarg value="--patch-module=java.base=@{classes}" if:set="modules"/>
263        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
264        <javac-elements/>        <javac-elements/>
265    
# Line 263  Line 270 
270            jvm="${java@{target}}"            jvm="${java@{target}}"
271            fork="true">            fork="true">
272          <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>          <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
273          <jvmarg value="-Xpatch:java.base=${build.classes.dir}/java.base" if:set="modules"/>          <jvmarg value="--patch-module=java.base=@{classes}" if:set="modules"/>
274            <jvmarg value="--add-opens=java.base/java.lang=ALL-UNNAMED" if:set="modules"/>
275            <jvmarg value="--add-opens=java.base/java.util=ALL-UNNAMED" if:set="modules"/>
276            <jvmarg value="--add-opens=java.base/java.util.concurrent=ALL-UNNAMED" if:set="modules"/>
277            <jvmarg value="--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED" if:set="modules"/>
278            <jvmarg value="--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED" if:set="modules"/>
279          <jvmarg line="@{jvmflags}"/>          <jvmarg line="@{jvmflags}"/>
280          <!-- ant -Dvmoptions="-Xmx8m" -Djsr166.tckTestClass=CompletableFutureTest tck -->          <!-- ant -Dvmoptions="-Xmx8m" -Djsr166.tckTestClass=CompletableFutureTest tck -->
281          <jvmarg line="${vmoptions}" if:set="vmoptions"/>          <jvmarg line="${vmoptions}" if:set="vmoptions"/>
# Line 285  Line 297 
297    </macrodef>    </macrodef>
298    
299    <!-- Define jtreg test sets for different jdk versions -->    <!-- Define jtreg test sets for different jdk versions -->
300      <fileset dir="${jtreg10.src.dir}">
301        <patternset id="jdk10.jtreg.tests">
302          <include name="**/*.java"/>
303        </patternset>
304      </fileset>
305    
306    <fileset dir="${jtreg9.src.dir}">    <fileset dir="${jtreg9.src.dir}">
307      <patternset id="jdk9.jtreg.tests">      <patternset id="jdk9.jtreg.tests">
308        <include name="**/*.java"/>        <include name="**/*.java"/>
# Line 294  Line 312 
312    <fileset dir="${jtreg8.src.dir}">    <fileset dir="${jtreg8.src.dir}">
313      <patternset id="jdk8.jtreg.tests">      <patternset id="jdk8.jtreg.tests">
314        <include name="**/*.java"/>        <include name="**/*.java"/>
       <exclude name="**/SpliteratorCharacteristics.java"/>  
       <!-- https://bugs.openjdk.java.net/browse/JDK-6842353 -->  
       <exclude name="**/GCDuringIteration.java"/>  
315      </patternset>      </patternset>
316    </fileset>    </fileset>
317    
# Line 311  Line 326 
326    
327    <macrodef name="run-jtreg-tests">    <macrodef name="run-jtreg-tests">
328      <!-- ant -Djtreg9.src.dir=src/test/jtreg/util/concurrent/CompletableFuture jtreg -->      <!-- ant -Djtreg9.src.dir=src/test/jtreg/util/concurrent/CompletableFuture jtreg -->
     <attribute name="source" default="7"/>  
329      <attribute name="target"/>      <attribute name="target"/>
330      <attribute name="workdir"/>      <attribute name="workdir"/>
331      <attribute name="classes"/>      <attribute name="classes"/>
332        <attribute name="verbose" default="${jtreg.verbose}"/>
333      <attribute name="jtregflags" default=""/>      <attribute name="jtregflags" default=""/>
334        <element name="jtreg-elements" optional="true"/>
335    
336      <sequential>      <sequential>
337    
# Line 328  Line 344 
344      </condition>      </condition>
345    
346      <delete dir="@{workdir}/JTwork"   quiet="true"/>      <delete dir="@{workdir}/JTwork"   quiet="true"/>
     <delete dir="@{workdir}/JTreport" quiet="true"/>  
347      <jtreg dir="${jtreg@{target}.src.dir}"      <jtreg dir="${jtreg@{target}.src.dir}"
348             jdk="${jdk@{target}.home}"             jdk="${jdk@{target}.home}"
349             workDir="@{workdir}/JTwork"             workDir="@{workdir}/JTwork">
            reportDir="@{workdir}/JTreport">  
350        <patternset refid="jdk@{target}.jtreg.tests"/>        <patternset refid="jdk@{target}.jtreg.tests"/>
351        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
352        <arg value="-vmoption:-Xpatch:java.base=${build.classes.dir}/java.base" if:set="modules"/>        <arg value="-javacoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
353          <arg value="-vmoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
354        <arg value="-agentvm"/>        <arg value="-agentvm"/>
355        <arg value="-verbose:${jtreg.verbose}"/>        <arg value="-noreport"/>
356          <arg value="-verbose:@{verbose}"/>
357        <arg value="-vmoptions:-esa -ea"/>        <arg value="-vmoptions:-esa -ea"/>
358        <arg value="-automatic"/>        <arg value="-automatic"/>
359        <arg value="-k:!ignore"/>        <arg value="-k:!ignore"/>
360        <arg line="@{jtregflags}"/>        <arg line="@{jtregflags}"/>
361        <arg line="${jtreg.flags}"/>        <arg line="${jtreg.flags}"/>
362          <jtreg-elements/>
363      </jtreg>      </jtreg>
364      </sequential>      </sequential>
365    </macrodef>    </macrodef>
# Line 359  Line 376 
376    <!-- Main targets -->    <!-- Main targets -->
377    
378    <property name="build.main.java.version" value="9"/>    <property name="build.main.java.version" value="9"/>
379    <property name="build.main.javac" value="${javac9}"/>    <!-- Workaround "no nested properties in ant" -->
380      <macrodef name="define-build-main-properties">
381        <attribute name="v"/>
382        <sequential>
383          <property name="build.main.java"    value="${java@{v}}"/>
384          <property name="build.main.javac"   value="${javac@{v}}"/>
385          <property name="build.main.javadoc" value="${javadoc@{v}}"/>
386        </sequential>
387      </macrodef>
388      <define-build-main-properties v="${build.main.java.version}"/>
389    
390    <target name="dists"    <target name="dists"
391            depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"            depends="dist, 4jdk8dist"
392            description="Builds all public jars and docs"/>            description="Builds all public jars and docs"/>
393              <!--
394                  depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"
395              -->
396    
397    <target name="compile"    <target name="compile"
398            depends="configure-compiler"            depends="configure-compiler"
399            description="Compiles src/main sources to build dir">            description="Compiles src/main sources to build dir">
400    
     <local name="modules"/>  
     <condition property="modules">  
       <and>  
         <available file="${jdk9.home}/jmods" type="dir"/>  
         <equals arg1="9" arg2="${build.main.java.version}"/>  
       </and>  
     </condition>  
   
401      <local name="destdir"/>      <local name="destdir"/>
402      <property name="destdir" value="${build.classes.dir}/java.base" if:set="modules"/>      <property name="destdir" value="${build.classes.dir}/java.base"/>
     <property name="destdir" value="${build.classes.dir}" unless:set="modules"/>  
403    
404      <mkdir dir="${destdir}"/>      <mkdir dir="${destdir}"/>
405    
# Line 391  Line 411 
411             classpath=""             classpath=""
412             includeAntRuntime="false"             includeAntRuntime="false"
413             includeJavaRuntime="false"             includeJavaRuntime="false"
414               encoding="ASCII"
415             executable="${build.main.javac}"             executable="${build.main.javac}"
416             fork="true">             fork="true">
417    
418        <include name="**/*.java"/>        <include name="**/*.java"/>
419        <compilerarg value="-Xmodule:java.base" if:set="modules"/>        <compilerarg value="--patch-module=java.base=${src.dir}"/>
420        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
421        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
422        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
423          <compilerarg line="--doclint-format html5"/>
424          <compilerarg value="-Xdoclint:all/protected,reference/private"/>
425        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
       <compilerarg value="-Xdoclint:all/protected"/>  
426        <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>        <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
427        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
428    
# Line 433  Line 455 
455      <!-- sourcepath for packages -->      <!-- sourcepath for packages -->
456    
457  <!--  TODO:       sourcepath="${src.dir}:${jdk9.src.dir}" -->  <!--  TODO:       sourcepath="${src.dir}:${jdk9.src.dir}" -->
458    <!-- TODO: sourcepath="${src.dir}:${jdk9.src.dir}:${jdk9.src.home}/jdk/src/java.logging/share/classes" -->
459    <!-- TODO: sourcepath="${src.dir}:${jdk9.home}/src.zip" -->
460    <!-- TODO: <arg line="-sourcepath ${src.dir}:${jdk9.home}/src.zip"/> -->
461    <!-- TODO: <arg line="- -module-source-path ${jdk9.home}/src.zip"/> -->
462      <javadoc destdir="${docs.dir}"      <javadoc destdir="${docs.dir}"
463               packagenames="none"               packagenames="none"
464               link="${java9.api.url}"               link="${java9.api.url}"
# Line 440  Line 466 
466               access="${build.javadoc.access}"               access="${build.javadoc.access}"
467               sourcepath="${src.dir}"               sourcepath="${src.dir}"
468               classpath=""               classpath=""
469               executable="${javadoc9}">               source="9"
470                 executable="${build.main.javadoc}">
471        <fileset dir="${src.dir}" defaultexcludes="yes">        <fileset dir="${src.dir}" defaultexcludes="yes">
472          <include name="**/*.java"/>          <include name="**/*.java"/>
473        </fileset>        </fileset>
474        <arg line="-Xdocrootparent ${java9.docroot.url}"/>        <arg line="-Xdocrootparent ${java9.docroot.url}"/>
475        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
476        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
477        <arg value="-Xmodule:java.base"/>        <arg value="-html5"/>
478          <arg value="--patch-module=java.base=${src.dir}"/>
479        <arg value="-tag"/>        <arg value="-tag"/>
480        <arg value="${javadoc.jls.option}"/>        <arg value="${javadoc.jls.option}"/>
481    <!-- @apiNote currently unused -->
482    <!--       <arg value="-tag"/> -->
483    <!--       <arg value="apiNote:a:API Note:"/> -->
484        <arg value="-tag"/>        <arg value="-tag"/>
485        <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>        <arg value="implSpec:a:Implementation Requirements:"/>
486        <arg value="-tag"/>        <arg value="-tag"/>
487        <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>        <arg value="implNote:a:Implementation Note:"/>
488        <arg value="-tag"/>  <!-- tags added in jdk9: currently unused -->
489        <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>  <!--       <arg value="-tag"/> -->
490  <!-- tags added in jdk9 -->  <!--       <arg value="revised:X"/> -->
491        <arg value="-tag"/>  <!--       <arg value="-tag"/> -->
492        <arg value="revised:X"/>  <!--       <arg value="spec:X"/> -->
       <arg value="-tag"/>  
       <arg value="spec:X"/>  
493      </javadoc>      </javadoc>
494    </target>    </target>
495    
# Line 494  Line 523 
523    
524    <target name="clean"    <target name="clean"
525            description="Removes all build products">            description="Removes all build products">
   
526      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
   
527    </target>    </target>
528    
529    
530    <target name="dist-clean"    <target name="dist-clean"
531            description="Removes all build and distribution products">            description="Removes all build and distribution products">
   
532      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
533      <delete dir="${dist.dir}"/>      <delete dir="${dist.dir}"/>
   
534    </target>    </target>
535    
536    
# Line 526  Line 551 
551      <run-tck-tests      <run-tck-tests
552        target="${build.main.java.version}"        target="${build.main.java.version}"
553        workdir="${build.dir}"        workdir="${build.dir}"
554        classes="${product.jar}"/>        classes="${product.jar}">
555          <javac-elements>
556            <compilerarg value="-Werror"/>
557          </javac-elements>
558        </run-tck-tests>
559    </target>    </target>
560    
561    <target name="tck-parallelism-1"    <target name="tck-parallelism-1"
# Line 561  Line 590 
590    
591    <target name="test"    <target name="test"
592            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"
593            description="Runs tck and jtreg tests for src/main">            description="Runs tck and jtreg tests for src/main"/>
   </target>  
594    
595  <!--   <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->  <!--   <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->
596    
# Line 573  Line 601 
601    
602  <!--   </target> -->  <!--   </target> -->
603    
604  <!--   <target name="test89" -->    <target name="test910"
605  <!--           description="Runs tck and jtreg tests for src/main for multiple java versions"> -->            description="Runs tck and jtreg tests for src/main for multiple java versions">
606    
607  <!--     <antcall target="clean"/> -->      <antcall target="clean"/>
608  <!--     <antcall target="test"> -->      <antcall target="test">
609  <!--       <param name="build.main.java.version" value="8"/> -->        <param name="build.main.java.version" value="9"/>
610  <!--       <param name="build.main.javac" value="${javac8}"/> -->      </antcall>
 <!--     </antcall> -->  
611    
612  <!--     <antcall target="clean"/> -->      <antcall target="clean"/>
613  <!--     <antcall target="test"> -->      <antcall target="test">
614  <!--       <param name="build.main.java.version" value="9"/> -->        <param name="build.main.java.version" value="10"/>
615  <!--       <param name="build.main.javac" value="${javac9}"/> -->      </antcall>
 <!--     </antcall> -->  
616    
617  <!--   </target> -->      <!-- Clean up to avoid obscure wrong class file version bugs -->
618        <antcall target="clean"/>
619    
620      </target>
621    
622    
623    
624    <target name="configure-compiler">    <target name="configure-compiler">
625      <fail message="ant version too old">      <fail message="ant version too old">
626        <condition>        <condition> <not> <antversion atleast="1.9.1"/> </not> </condition>
         <not> <antversion atleast="1.9.1"/> </not>  
       </condition>  
627      </fail>      </fail>
628    
629      <property name="unchecked.option" value="-Xlint:unchecked"/>      <property name="unchecked.option" value="-Xlint:unchecked"/>
# Line 630  Line 657 
657        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
658             source="${build.sourcelevel}"             source="${build.sourcelevel}"
659             target="${build.sourcelevel}"             target="${build.sourcelevel}"
660             encoding="ASCII"
661               fork="true">               fork="true">
662    
663        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
# Line 641  Line 669 
669      <java classname="ALoops" fork="true">      <java classname="ALoops" fork="true">
670        <classpath refid="loops.classpath"/>        <classpath refid="loops.classpath"/>
671      </java>      </java>
   
672    </target>    </target>
673    
674    
675    <target name="compile-test-loops" depends="jar"    <target name="compile-test-loops" depends="jar"
676            description="compile all the perf tests in src/test/loops">            description="Compiles all the perf tests in src/test/loops">
677    
678      <mkdir dir="${build.dir}/test/loops"/>      <mkdir dir="${build.dir}/test/loops"/>
679    
# Line 657  Line 684 
684             deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
685             includeAntRuntime="false"             includeAntRuntime="false"
686             includeJavaRuntime="false"             includeJavaRuntime="false"
687             executable="${javac9}"             encoding="ASCII"
688               executable="${build.main.javac}"
689             fork="true">             fork="true">
690    
691        <include name="*.java"/>        <include name="*.java"/>
# Line 665  Line 693 
693        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
694        <compilerarg value="-Xbootclasspath/p:${product.jar}"/>        <compilerarg value="-Xbootclasspath/p:${product.jar}"/>
695        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
696      </javac>      </javac>
   
697    </target>    </target>
698    
699    
# Line 690  Line 716 
716             bootclasspath="${bootclasspath8}"             bootclasspath="${bootclasspath8}"
717             includeAntRuntime="false"             includeAntRuntime="false"
718             includeJavaRuntime="false"             includeJavaRuntime="false"
719               encoding="ASCII"
720             executable="${javac8}"             executable="${javac8}"
721             fork="true">             fork="true">
   
722        <include name="**/*.java"/>        <include name="**/*.java"/>
723        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
724        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
725        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
726        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
727        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
728      </javac>      </javac>
729    </target>    </target>
730    
# Line 720  Line 745 
745             bootclasspath="${bootclasspath8}"             bootclasspath="${bootclasspath8}"
746             includeAntRuntime="false"             includeAntRuntime="false"
747             includeJavaRuntime="false"             includeJavaRuntime="false"
748               encoding="ASCII"
749             executable="${javac8}"             executable="${javac8}"
750             fork="true">             fork="true">
   
751        <include name="**/*.java"/>        <include name="**/*.java"/>
752        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
753        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
754        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
755        <compilerarg value="-Xdoclint:all/protected"/>        <compilerarg value="-Xdoclint:all/protected,reference/private"/>
756        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
757      </javac>      </javac>
758    </target>    </target>
759    
# Line 745  Line 769 
769          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
770        </manifest>        </manifest>
771      </jar>      </jar>
   
772    </target>    </target>
773    
774    
# Line 761  Line 784 
784          <!-- JDK9+ test classes -->          <!-- JDK9+ test classes -->
785          <exclude name="*9Test.java"/>          <exclude name="*9Test.java"/>
786          <exclude name="*10Test.java"/>          <exclude name="*10Test.java"/>
787            <compilerarg value="-Werror"/>
788        </javac-elements>        </javac-elements>
789      </run-tck-tests>      </run-tck-tests>
790    </target>    </target>
# Line 778  Line 802 
802    
803    <target name="4jdk8-test"    <target name="4jdk8-test"
804            depends="4jdk8-tck, 4jdk8-jtreg"            depends="4jdk8-tck, 4jdk8-jtreg"
805            description="Runs tck and jtreg tests for jsr166-4jdk8">            description="Runs tck and jtreg tests for jsr166-4jdk8"/>
   </target>  
806    
807    
808    <target name="4jdk8docs"    <target name="4jdk8docs"
# Line 795  Line 818 
818               access="${build.javadoc.access}"               access="${build.javadoc.access}"
819               sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"               sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"
820               classpath=""               classpath=""
821                 source="8"
822               executable="${javadoc8}"               executable="${javadoc8}"
823               failonerror = "true">               failonerror = "true">
824        <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">        <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">
# Line 804  Line 828 
828        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
829        <arg value="-tag"/>        <arg value="-tag"/>
830        <arg value="${javadoc.jls.option}"/>        <arg value="${javadoc.jls.option}"/>
831        <arg value="-tag"/>  <!-- @apiNote currently unused -->
832        <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>  <!--       <arg value="-tag"/> -->
833    <!--       <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/> -->
834        <arg value="-tag"/>        <arg value="-tag"/>
835        <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>        <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
836        <arg value="-tag"/>        <arg value="-tag"/>
# Line 821  Line 846 
846    
847    <target name="4jdk8clean"    <target name="4jdk8clean"
848            description="Removes all 4jdk8 build products">            description="Removes all 4jdk8 build products">
   
849      <delete dir="${build.4jdk8.dir}"/>      <delete dir="${build.4jdk8.dir}"/>
   
850    </target>    </target>
851    
852    
# Line 839  Line 862 
862    </target>    </target>
863    
864    
865      <!-- jsr166 4jdk7 (no longer maintained) -->
866    
867    <!-- jsr166 4jdk7 -->    <target name="4jdk7compile" depends="configure-compiler">
   
   <target name="4jdk7compile"  
           depends="configure-compiler"  
           description="Compiles src/jdk7 sources, targeting jdk7">  
   
868      <mkdir dir="${build.4jdk7.classes.dir}"/>      <mkdir dir="${build.4jdk7.classes.dir}"/>
869    
870      <javac srcdir="${4jdk7src.dir}"      <javac srcdir="${4jdk7src.dir}"
# Line 859  Line 878 
878             bootclasspath="${bootclasspath6}"             bootclasspath="${bootclasspath6}"
879             includeAntRuntime="false"             includeAntRuntime="false"
880             includeJavaRuntime="false"             includeJavaRuntime="false"
881               encoding="ASCII"
882             executable="${javac7}"             executable="${javac7}"
883             fork="true">             fork="true">
884    
# Line 868  Line 888 
888        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
889        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
890        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
891      </javac>      </javac>
892    </target>    </target>
893    
894    <target name="4jdk7doclint"    <target name="4jdk7doclint" depends="configure-compiler">
           depends="configure-compiler"  
           description="Finds doclint warnings">  
   
895      <mkdir dir="${build.4jdk7.classes.dir}"/>      <mkdir dir="${build.4jdk7.classes.dir}"/>
896    
897      <javac srcdir="${4jdk7src.dir}"      <javac srcdir="${4jdk7src.dir}"
# Line 889  Line 905 
905             bootclasspath="${bootclasspath6}"             bootclasspath="${bootclasspath6}"
906             includeAntRuntime="false"             includeAntRuntime="false"
907             includeJavaRuntime="false"             includeJavaRuntime="false"
908               encoding="ASCII"
909             executable="${javac8}"             executable="${javac8}"
910             fork="true">             fork="true">
911    
# Line 898  Line 915 
915        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
916        <compilerarg value="-Xdoclint:all/protected"/>        <compilerarg value="-Xdoclint:all/protected"/>
917        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
918      </javac>      </javac>
919    </target>    </target>
920    
921      <target name="4jdk7jar" depends="4jdk7compile">
   <target name="4jdk7jar"  
           depends="4jdk7compile"  
           description="Builds library jar from compiled sources">  
   
922      <jar destfile="${4jdk7product.jar}">      <jar destfile="${4jdk7product.jar}">
923        <fileset dir="${build.4jdk7.classes.dir}"/>        <fileset dir="${build.4jdk7.classes.dir}"/>
924        <manifest>        <manifest>
# Line 914  Line 926 
926          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
927        </manifest>        </manifest>
928      </jar>      </jar>
   
929    </target>    </target>
930    
931      <target name="4jdk7-tck" depends="4jdk7jar">
   <target name="4jdk7-tck"  
           depends="4jdk7jar"  
           description="Runs tck tests for jsr166-4jdk7 directly">  
   
932      <run-tck-tests      <run-tck-tests
933        target="7"        target="7"
934        workdir="${build.4jdk7.dir}"        workdir="${build.4jdk7.dir}"
# Line 939  Line 946 
946          <exclude name="SplittableRandomTest.java"/>          <exclude name="SplittableRandomTest.java"/>
947          <exclude name="StampedLockTest.java"/>          <exclude name="StampedLockTest.java"/>
948          <exclude name="SubmissionPublisherTest.java"/>          <exclude name="SubmissionPublisherTest.java"/>
949            <compilerarg value="-Werror"/>
950        </javac-elements>        </javac-elements>
951      </run-tck-tests>      </run-tck-tests>
952    </target>    </target>
953    
   
954    <!-- Runs tck tests for jsr166-4jdk7 via junit task (dead experiment) -->    <!-- Runs tck tests for jsr166-4jdk7 via junit task (dead experiment) -->
955    <target name="4jdk7-tck-junit"    <target name="4jdk7-tck-junit" depends="4jdk7compile">
           depends="4jdk7compile">  
956    
957      <junit printsummary="true"      <junit printsummary="true"
958             showoutput="true"             showoutput="true"
# Line 968  Line 974 
974    
975        <test name="${jsr166.tckTestClass}" haltonfailure="no">        <test name="${jsr166.tckTestClass}" haltonfailure="no">
976        </test>        </test>
   
977      </junit>      </junit>
978    </target>    </target>
979    
980    <target name="4jdk7-jtreg"    <target name="4jdk7-jtreg" depends="4jdk7jar">
           depends="4jdk7jar"  
           description="Runs jtreg tests for jsr166-4jdk7 using the jtreg ant task">  
981      <run-jtreg-tests      <run-jtreg-tests
982         target="7"         target="7"
983         workdir="${build.4jdk7.dir}"         workdir="${build.4jdk7.dir}"
984         classes="${4jdk7product.jar}"/>         classes="${4jdk7product.jar}"/>
985    </target>    </target>
986    
987      <target name="4jdk7-test" depends="4jdk7-tck, 4jdk7-jtreg"/>
988    
989    <target name="4jdk7-test"    <target name="4jdk7docs">
           depends="4jdk7-tck, 4jdk7-jtreg"  
           description="Runs tck and jtreg tests for jsr166-4jdk7">  
   </target>  
   
   
   <target name="4jdk7docs"  
           description="Builds javadocs for src/jdk7 to dist dir">  
   
990      <delete dir="${4jdk7docs.dir}"/>      <delete dir="${4jdk7docs.dir}"/>
991      <mkdir dir="${4jdk7docs.dir}"/>      <mkdir dir="${4jdk7docs.dir}"/>
992    
# Line 1011  Line 1007 
1007      </javadoc>      </javadoc>
1008    </target>    </target>
1009    
1010      <target name="4jdk7dist" depends="4jdk7dist-jar, 4jdk7dist-docs"/>
1011    
1012    <target name="4jdk7dist"    <target name="4jdk7clean">
           depends="4jdk7dist-jar, 4jdk7dist-docs"  
           description="Puts all distributable products in single hierarchy"/>  
   
   
   <target name="4jdk7clean"  
           description="Removes all 4jdk7 build products">  
   
1013      <delete dir="${build.4jdk7.dir}"/>      <delete dir="${build.4jdk7.dir}"/>
   
1014    </target>    </target>
1015    
1016      <target name="4jdk7dist-jar" depends="4jdk7clean, 4jdk7jar">
   <target name="4jdk7dist-jar"  
           depends="4jdk7clean, 4jdk7jar">  
1017      <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>      <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>
1018    </target>    </target>
1019    
1020      <target name="4jdk7dist-docs" depends="4jdk7clean, 4jdk7docs">
   <target name="4jdk7dist-docs"  
           depends="4jdk7clean, 4jdk7docs">  
1021      <mirror-dir src="${4jdk7docs.dir}" dst="${dist.4jdk7docs.dir}"/>      <mirror-dir src="${4jdk7docs.dir}" dst="${dist.4jdk7docs.dir}"/>
1022    </target>    </target>
1023    
1024    
1025    <!-- jsr166x -->    <!-- jsr166x (no longer maintained) -->
   
   <target name="jsr166xcompile"  
           depends="configure-compiler"  
           description="Compiles jsr166x sources to build dir">  
1026    
1027      <target name="jsr166xcompile" depends="configure-compiler">
1028      <mkdir dir="${build.jsr166x.classes.dir}"/>      <mkdir dir="${build.jsr166x.classes.dir}"/>
1029    
1030      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1056  Line 1038 
1038             target="5"             target="5"
1039             includeAntRuntime="false"             includeAntRuntime="false"
1040             includeJavaRuntime="false"             includeJavaRuntime="false"
1041               encoding="ASCII"
1042             executable="${javac7}"             executable="${javac7}"
1043             fork="true">             fork="true">
   
1044        <include name="jsr166x/**/*.java"/>        <include name="jsr166x/**/*.java"/>
1045        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
1046        <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>
1047        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1048        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1049      </javac>      </javac>
1050    </target>    </target>
1051    
1052      <target name="jsr166xjar" depends="jsr166xcompile">
   <target name="jsr166xjar"  
           depends="jsr166xcompile"  
           description="Builds library jar from compiled sources">  
   
1053      <jar destfile="${jsr166x.jar}">      <jar destfile="${jsr166x.jar}">
1054        <fileset dir="${build.jsr166x.classes.dir}"/>        <fileset dir="${build.jsr166x.classes.dir}"/>
1055        <manifest>        <manifest>
# Line 1080  Line 1057 
1057          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1058        </manifest>        </manifest>
1059      </jar>      </jar>
   
1060    </target>    </target>
1061    
1062      <target name="jsr166xdocs">
   <target name="jsr166xdocs"  
           description="Builds javadocs to dist dir">  
   
1063      <delete dir="${jsr166xdocs.dir}"/>      <delete dir="${jsr166xdocs.dir}"/>
1064      <mkdir dir="${jsr166xdocs.dir}"/>      <mkdir dir="${jsr166xdocs.dir}"/>
1065    
# Line 1101  Line 1074 
1074               failonerror = "true">               failonerror = "true">
1075        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1076        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1077      </javadoc>      </javadoc>
1078    </target>    </target>
1079    
1080      <target name="jsr166xdist" depends="jsr166xdist-jar, jsr166xdist-docs"/>
1081    
1082    <target name="jsr166xdist"    <target name="jsr166xclean">
           depends="jsr166xdist-jar, jsr166xdist-docs"  
           description="Puts all distributable products in single hierarchy"/>  
   
   
   <target name="jsr166xclean"  
           description="Removes all jsr166x build products">  
   
1083      <delete dir="${build.jsr166x.dir}"/>      <delete dir="${build.jsr166x.dir}"/>
   
1084    </target>    </target>
1085    
1086      <target name="jsr166xdist-jar" depends="jsr166xclean, jsr166xjar">
   <target name="jsr166xdist-jar"  
           depends="jsr166xclean, jsr166xjar">  
1087      <copy file="${jsr166x.jar}" todir="${dist.dir}"/>      <copy file="${jsr166x.jar}" todir="${dist.dir}"/>
1088    </target>    </target>
1089    
1090    <target name="jsr166xdist-docs"    <target name="jsr166xdist-docs" depends="jsr166xclean, jsr166xdocs">
           depends="jsr166xclean, jsr166xdocs">  
1091      <mirror-dir src="${jsr166xdocs.dir}" dst="${dist.jsr166xdocs.dir}"/>      <mirror-dir src="${jsr166xdocs.dir}" dst="${dist.jsr166xdocs.dir}"/>
1092    </target>    </target>
1093    
   <!-- jsr166y -->  
1094    
1095      <!-- jsr166y (no longer maintained) -->
1096    
1097    <target name="jsr166ycompile"    <target name="jsr166ycompile" depends="configure-compiler">
           depends="configure-compiler"  
           description="Compiles jsr166y sources">  
   
1098      <mkdir dir="${build.jsr166y.classes.dir}"/>      <mkdir dir="${build.jsr166y.classes.dir}"/>
1099    
1100      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1149  Line 1108 
1108             bootclasspath="${bootclasspath6}"             bootclasspath="${bootclasspath6}"
1109             includeAntRuntime="false"             includeAntRuntime="false"
1110             includeJavaRuntime="false"             includeJavaRuntime="false"
1111               encoding="ASCII"
1112             executable="${javac7}"             executable="${javac7}"
1113             fork="true">             fork="true">
1114    
# Line 1157  Line 1117 
1117        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
1118        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1119        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1120      </javac>      </javac>
1121    </target>    </target>
1122    
1123      <target name="jsr166yjar" depends="jsr166ycompile">
   <target name="jsr166yjar"  
           depends="jsr166ycompile"  
           description="Builds library jar from compiled sources">  
   
1124      <jar destfile="${jsr166y.jar}" index="true">      <jar destfile="${jsr166y.jar}" index="true">
1125        <fileset dir="${build.jsr166y.classes.dir}"/>        <fileset dir="${build.jsr166y.classes.dir}"/>
1126        <manifest>        <manifest>
# Line 1173  Line 1128 
1128          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1129        </manifest>        </manifest>
1130      </jar>      </jar>
   
1131    </target>    </target>
1132    
1133      <target name="jsr166ydocs">
   <target name="jsr166ydocs"  
           description="Builds javadocs to dist dir">  
   
1134      <delete dir="${jsr166ydocs.dir}"/>      <delete dir="${jsr166ydocs.dir}"/>
1135      <mkdir dir="${jsr166ydocs.dir}"/>      <mkdir dir="${jsr166ydocs.dir}"/>
1136    
# Line 1194  Line 1145 
1145               failonerror = "true">               failonerror = "true">
1146        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1147        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1148      </javadoc>      </javadoc>
1149    </target>    </target>
1150    
1151      <target name="jsr166ydist" depends="jsr166ydist-jar, jsr166ydist-docs"/>
1152    
1153    <target name="jsr166ydist"    <target name="jsr166yclean">
           depends="jsr166ydist-jar, jsr166ydist-docs"  
           description="Puts all distributable products in single hierarchy"/>  
   
   
   <target name="jsr166yclean"  
           description="Removes all jsr166y build products">  
   
1154      <delete dir="${build.jsr166y.dir}"/>      <delete dir="${build.jsr166y.dir}"/>
   
1155    </target>    </target>
1156    
1157      <target name="jsr166ydist-jar" depends="jsr166yclean, jsr166yjar">
   <target name="jsr166ydist-jar"  
           depends="jsr166yclean, jsr166yjar">  
1158      <copy file="${jsr166y.jar}" todir="${dist.dir}"/>      <copy file="${jsr166y.jar}" todir="${dist.dir}"/>
1159    </target>    </target>
1160    
1161    <target name="jsr166ydist-docs"    <target name="jsr166ydist-docs" depends="jsr166yclean, jsr166ydocs">
           depends="jsr166yclean, jsr166ydocs">  
1162      <mirror-dir src="${jsr166ydocs.dir}" dst="${dist.jsr166ydocs.dir}"/>      <mirror-dir src="${jsr166ydocs.dir}" dst="${dist.jsr166ydocs.dir}"/>
1163    </target>    </target>
1164    
1165    
1166    <!-- extra166y -->    <!-- extra166y (no longer maintained) -->
   
   
   <target name="extra166ycompile"  
           depends="configure-compiler, jsr166yjar"  
           description="Compiles extra166y sources">  
1167    
1168      <target name="extra166ycompile" depends="configure-compiler, jsr166yjar">
1169      <mkdir dir="${build.extra166y.classes.dir}"/>      <mkdir dir="${build.extra166y.classes.dir}"/>
1170    
1171      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1243  Line 1179 
1179             target="6"             target="6"
1180             includeAntRuntime="false"             includeAntRuntime="false"
1181             includeJavaRuntime="false"             includeJavaRuntime="false"
1182               encoding="ASCII"
1183             executable="${javac7}"             executable="${javac7}"
1184             fork="true">             fork="true">
1185    
# Line 1251  Line 1188 
1188        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
1189        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1190        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1191      </javac>      </javac>
1192    </target>    </target>
1193    
1194      <target name="extra166yjar" depends="extra166ycompile">
   <target name="extra166yjar"  
           depends="extra166ycompile"  
           description="Builds library jar from compiled sources">  
   
1195      <jar destfile="${extra166y.jar}" index="true">      <jar destfile="${extra166y.jar}" index="true">
1196        <fileset dir="${build.extra166y.classes.dir}"/>        <fileset dir="${build.extra166y.classes.dir}"/>
1197        <manifest>        <manifest>
# Line 1267  Line 1199 
1199          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1200        </manifest>        </manifest>
1201      </jar>      </jar>
   
1202    </target>    </target>
1203    
1204      <target name="extra166ydocs">
   <target name="extra166ydocs"  
           description="Builds javadocs to build dir">  
   
1205      <delete dir="${extra166ydocs.dir}"/>      <delete dir="${extra166ydocs.dir}"/>
1206      <mkdir dir="${extra166ydocs.dir}"/>      <mkdir dir="${extra166ydocs.dir}"/>
1207    
# Line 1287  Line 1215 
1215               executable="${javadoc7}">               executable="${javadoc7}">
1216        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1217        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1218      </javadoc>      </javadoc>
1219    </target>    </target>
1220    
1221      <target name="extra166ydist" depends="extra166ydist-jar, extra166ydist-docs"/>
1222    
1223    <target name="extra166ydist"    <target name="extra166yclean">
           depends="extra166ydist-jar, extra166ydist-docs"  
           description="Puts all distributable products in single hierarchy"/>  
   
   
   <target name="extra166yclean"  
           description="Removes all extra166y build products">  
   
1224      <delete dir="${build.extra166y.dir}"/>      <delete dir="${build.extra166y.dir}"/>
   
1225    </target>    </target>
1226    
1227      <target name="extra166ydist-jar" depends="extra166yclean, extra166yjar">
   <target name="extra166ydist-jar"  
           depends="extra166yclean, extra166yjar">  
1228      <copy file="${extra166y.jar}" todir="${dist.dir}"/>      <copy file="${extra166y.jar}" todir="${dist.dir}"/>
1229    </target>    </target>
1230    
1231    <target name="extra166ydist-docs"    <target name="extra166ydist-docs" depends="extra166yclean, extra166ydocs">
           depends="extra166yclean, extra166ydocs">  
1232      <mirror-dir src="${extra166ydocs.dir}" dst="${dist.extra166ydocs.dir}"/>      <mirror-dir src="${extra166ydocs.dir}" dst="${dist.extra166ydocs.dir}"/>
1233    </target>    </target>
1234    
1235    <!-- jsr166e -->  
1236      <!-- jsr166e (no longer maintained) -->
1237    
1238    <property name="build.jsr166e.java.version" value="6"/>    <property name="build.jsr166e.java.version" value="6"/>
1239    <property name="build.jsr166e.javac" value="${javac6}"/>    <property name="build.jsr166e.javac" value="${javac6}"/>
1240    
1241    <target name="jsr166ecompile"    <target name="jsr166ecompile" depends="configure-compiler">
           depends="configure-compiler"  
           description="Compiles jsr166e sources">  
   
1242      <mkdir dir="${build.jsr166e.classes.dir}"/>      <mkdir dir="${build.jsr166e.classes.dir}"/>
1243    
1244      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1344  Line 1259 
1259        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
1260        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1261        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1262      </javac>      </javac>
1263    </target>    </target>
1264    
   <!-- jsr166e: find doclint errors -->  
1265    <target name="jsr166edoclint">    <target name="jsr166edoclint">
   
1266      <mkdir dir="${build.jsr166e.classes.dir}"/>      <mkdir dir="${build.jsr166e.classes.dir}"/>
1267    
1268      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1372  Line 1284 
1284        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
1285        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1286        <compilerarg value="-Xdoclint:all/protected"/>        <compilerarg value="-Xdoclint:all/protected"/>
   
1287      </javac>      </javac>
1288    </target>    </target>
1289    
1290      <target name="jsr166ejar" depends="jsr166ecompile">
   <target name="jsr166ejar"  
           depends="jsr166ecompile"  
           description="Builds library jar from compiled sources">  
   
1291      <jar destfile="${jsr166e.jar}" index="true">      <jar destfile="${jsr166e.jar}" index="true">
1292        <fileset dir="${build.jsr166e.classes.dir}"/>        <fileset dir="${build.jsr166e.classes.dir}"/>
1293        <manifest>        <manifest>
# Line 1388  Line 1295 
1295          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1296        </manifest>        </manifest>
1297      </jar>      </jar>
   
1298    </target>    </target>
1299    
1300      <target name="jsr166edocs">
   <target name="jsr166edocs"  
           description="Builds javadocs to build dir">  
   
1301      <delete dir="${jsr166edocs.dir}"/>      <delete dir="${jsr166edocs.dir}"/>
1302      <mkdir dir="${jsr166edocs.dir}"/>      <mkdir dir="${jsr166edocs.dir}"/>
1303    
# Line 1408  Line 1311 
1311               failonerror = "true">               failonerror = "true">
1312        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1313        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1314      </javadoc>      </javadoc>
1315    </target>    </target>
1316    
1317      <target name="jsr166e-tck-one-java-version" depends="jsr166ejar">
   <target name="jsr166e-tck-one-java-version"  
           depends="jsr166ejar">  
   
1318      <echo message="Testing with jdk${build.jsr166e.java.version} ..."/>      <echo message="Testing with jdk${build.jsr166e.java.version} ..."/>
   
1319      <run-tck-tests      <run-tck-tests
1320        tck.src.dir="${test.src.dir}/tck-jsr166e"        tck.src.dir="${test.src.dir}/tck-jsr166e"
1321        target="${build.jsr166e.java.version}"        target="${build.jsr166e.java.version}"
# Line 1425  Line 1323 
1323        classes="${jsr166e.jar}"/>        classes="${jsr166e.jar}"/>
1324    </target>    </target>
1325    
1326    <target name="jsr166e-tck"    <target name="jsr166e-tck">
           description="Runs tck tests for jsr166e for multiple java versions">  
1327    
1328  <!--     <antcall target="clean"/> -->  <!--     <antcall target="clean"/> -->
1329  <!--     <antcall target="jsr166e-tck-one-java-version"> -->  <!--     <antcall target="jsr166e-tck-one-java-version"> -->
# Line 1447  Line 1344 
1344      </antcall>      </antcall>
1345    </target>    </target>
1346    
1347      <target name="jsr166e-test" depends="jsr166e-tck"/>
1348    
1349    <target name="jsr166e-test"    <target name="jsr166edist" depends="jsr166edist-jar, jsr166edist-docs"/>
           depends="jsr166e-tck"  
           description="Runs all tests for jsr166e">  
   </target>  
1350    
1351    <target name="jsr166edist"    <target name="jsr166eclean">
           depends="jsr166edist-jar, jsr166edist-docs"  
           description="Puts all distributable products in single hierarchy"/>  
   
   
   <target name="jsr166eclean"  
           description="Removes all jsr166e build products">  
1352      <delete dir="${build.jsr166e.dir}"/>      <delete dir="${build.jsr166e.dir}"/>
1353    </target>    </target>
1354    
   
1355    <target name="jsr166edist-jar"    <target name="jsr166edist-jar"
1356            depends="jsr166eclean, jsr166ejar">            depends="jsr166eclean, jsr166ejar">
1357      <copy file="${jsr166e.jar}" todir="${dist.dir}"/>      <copy file="${jsr166e.jar}" todir="${dist.dir}"/>
1358    </target>    </target>
1359    
1360    <target name="jsr166edist-docs"    <target name="jsr166edist-docs" depends="jsr166eclean, jsr166edocs">
           depends="jsr166eclean, jsr166edocs">  
1361      <mirror-dir src="${jsr166edocs.dir}" dst="${dist.jsr166edocs.dir}"/>      <mirror-dir src="${jsr166edocs.dir}" dst="${dist.jsr166edocs.dir}"/>
1362    </target>    </target>
1363    
# Line 1491  Line 1378 
1378    </target>    </target>
1379    
1380    
1381    <!-- ==============================================================
1382      Experimental errorprone support - http://errorprone.info
1383    =================================================================== -->
1384      <property name="errorprone.jar" location="${lib.dir}/error_prone_ant-2.1.2.jar"/>
1385      <target name="errorprone"
1386              depends="clean, configure-compiler"
1387              description="Run errorprone over jsr166 source code (experimental)">
1388    
1389        <local name="destdir"/>
1390        <property name="destdir" value="${build.classes.dir}/java.base"/>
1391        <mkdir dir="${destdir}"/>
1392    
1393        <javac srcdir="${src.dir}"
1394               destdir="${destdir}"
1395               debug="${build.debug}"
1396               debuglevel="${build.debuglevel}"
1397               deprecation="${build.deprecation}"
1398               classpath=""
1399               includeAntRuntime="false"
1400               includeJavaRuntime="false"
1401               encoding="ASCII"
1402               executable="${build.main.javac}"
1403               fork="true">
1404    
1405          <include name="**/*.java"/>
1406          <compilerarg line="-processorpath ${errorprone.jar}"/>
1407          <compilerarg value="-Xplugin:ErrorProne
1408                              -Xep:IdentityBinaryExpression:WARN
1409                              -Xep:MissingOverride:OFF
1410                              -Xep:MixedArrayDimensions:ERROR
1411                              -Xep:RemoveUnusedImports:ERROR
1412                              -Xep:ClassName:ERROR
1413                              -Xep:MultipleTopLevelClasses:ERROR
1414                              -Xep:EmptyIf:ERROR
1415                              -Xep:LongLiteralLowerCaseSuffix:ERROR
1416                              -Xep:RedundantThrows:ERROR
1417                              -Xep:MethodCanBeStatic:WARN"/>
1418          <compilerarg value="--patch-module=java.base=${src.dir}"/>
1419          <compilerarg value="-Xprefer:source"/>
1420          <compilerarg value="-XDignore.symbol.file=true"/>
1421          <compilerarg value="-Xlint:all"/>
1422          <compilerarg value="-Xdoclint:all/protected,reference/private"/>
1423          <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1424          <compilerarg line="${build.args}"/>
1425        </javac>
1426    
1427        <jar destfile="${product.jar}">
1428          <fileset dir="${destdir}"/>
1429        </jar>
1430    
1431        <run-tck-tests
1432          target="${build.main.java.version}"
1433          workdir="${build.dir}"
1434          classes="${product.jar}">
1435          <javac-elements>
1436            <compilerarg line="-processorpath ${errorprone.jar}"/>
1437            <compilerarg value="-Xplugin:ErrorProne
1438                                -Xep:IdentityBinaryExpression:WARN
1439                                -Xep:BoxedPrimitiveConstructor:OFF
1440                                -Xep:HashtableContains:OFF
1441                                -Xep:ModifyingCollectionWithItself:OFF
1442                                -Xep:MissingOverride:OFF
1443                                -Xep:MissingFail:OFF
1444                                -Xep:JdkObsolete:OFF
1445                                -Xep:MixedArrayDimensions:ERROR
1446                                -Xep:RemoveUnusedImports:ERROR
1447                                -Xep:ClassName:ERROR
1448                                -Xep:MultipleTopLevelClasses:ERROR
1449                                -Xep:EmptyIf:ERROR
1450                                -Xep:LongLiteralLowerCaseSuffix:ERROR
1451                                -Xep:RedundantThrows:ERROR
1452                                -Xep:MethodCanBeStatic:WARN"/>
1453            <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1454          </javac-elements>
1455        </run-tck-tests>
1456      </target>
1457    
1458      <!-- ant errorprone-jtreg |& grep -EA1 '(warning|error):' -->
1459      <target name="errorprone-jtreg"
1460              depends="jar"
1461              description="Run errorprone over jtreg tests (experimental)">
1462    
1463        <run-jtreg-tests
1464           target="${build.main.java.version}"
1465           workdir="${build.dir}"
1466           classes="${product.jar}"
1467           verbose="all">
1468          <jtreg-elements>
1469            <arg value="-javacoption:-processorpath"/>
1470            <arg value="-javacoption:${errorprone.jar}"/>
1471            <arg value="-javacoption:-Xplugin:ErrorProne
1472                                -Xep:IdentityBinaryExpression:WARN
1473                                -Xep:BoxedPrimitiveConstructor:OFF
1474                                -Xep:HashtableContains:OFF
1475                                -Xep:ModifyingCollectionWithItself:OFF
1476                                -Xep:MissingOverride:OFF
1477                                -Xep:JdkObsolete:OFF
1478                                -Xep:NonAtomicVolatileUpdate:OFF
1479                                -Xep:MixedArrayDimensions:ERROR
1480                                -Xep:RemoveUnusedImports:ERROR
1481                                -Xep:ClassName:ERROR
1482                                -Xep:MultipleTopLevelClasses:ERROR
1483                                -Xep:EmptyIf:ERROR
1484                                -Xep:LongLiteralLowerCaseSuffix:ERROR
1485                                -Xep:RedundantThrows:ERROR
1486                                -Xep:MethodCanBeStatic:WARN"/>
1487          </jtreg-elements>
1488        </run-jtreg-tests>
1489      </target>
1490    
1491    
1492    <!-- ==============================================================
1493      Running guava tests against jsr166 code
1494    =================================================================== -->
1495    
1496    <!-- <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" -->
1497    <!--   organisation="com.google.guava" module="guava-testlib" revision="21.0"/> -->
1498    <!-- <property name="guava.version" value="21.0"/> -->
1499    
1500    <!-- HOWTO debug print a path id -->
1501    <!-- <pathconvert property="guava.testlib.classpath" refid="guava.testlib.classpath" /> -->
1502    <!-- <echo message="guava.testlib.classpath=${guava.testlib.classpath}"/> -->
1503    
1504    <!-- <ivy:retrieve pathid="guava.tests.classpath" type="jar" inline="true" conf="*" pattern="${lib.dir}/[type]/[artifact].[ext]" -->
1505    <!--   organisation="com.google.guava" module="guava-tests"/> -->
1506    <!-- <get src="http://repo2.maven.org/maven2/com/google/guava/guava-tests/${guava.version}/guava-tests-${guava.version}-tests.jar" -->
1507    <!--   dest="${lib.dir}/jar/guava-tests-tests.jar" usetimestamp="true"/> -->
1508    <!--     <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" type="*" -->
1509    <!--       organisation="com.google.guava" module="guava-testlib" revision="${guava.version}"/> -->
1510    
1511    <!-- <test name="com.google.common.collect.testing.TestsForQueuesInJavaUtil"/> -->
1512    <!-- <test name="com.google.common.collect.testing.TestsForListsInJavaUtil"/> -->
1513    <!-- <test name="com.google.common.collect.testing.TestsForSetsInJavaUtil"/> -->
1514    <!-- <test name="com.google.common.collect.testing.TestsForMapsInJavaUtil"/> -->
1515    
1516    <!-- <ivy:retrieve pathid="guava.testlib.classpath" -->
1517    <!--   type="*" inline="true" conf="*(private),*(public)" -->
1518    <!--   pattern="${guava.dir}/[artifact].[ext]" -->
1519    <!--   organisation="com.google.guava" module="guava-testlib"/> -->
1520    
1521    <!-- Work around bug below by downloading guava-testlib-tests.jar "by hand": -->
1522    <!-- https://issues.apache.org/jira/browse/IVY-1444 -->
1523    <!-- maven tests artifacts cannot be downloaded because they are mapped to private configurations -->
1524    
1525      <target name="init-ivy">
1526        <get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar"
1527             dest="${build.dir}/ivy.jar" usetimestamp="true" skipexisting="true"/>
1528        <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant"
1529                 classpath="${build.dir}/ivy.jar"/>
1530      </target>
1531    
1532      <target name="guava-tests" depends="jar, init-ivy"
1533              description="Guava tests run against jsr166 collections">
1534        <property name="guava.dir" value="${build.dir}/guava-testlib"/>
1535        <mkdir dir="${guava.dir}"/>
1536        <ivy:retrieve pathid="guava.testlib.classpath"
1537          type="jar,bundle" inline="true" conf="default,master"
1538          pattern="${guava.dir}/[artifact].[ext]"
1539          organisation="com.google.guava" module="guava-testlib"/>
1540        <property name="guava.version" value="21.0"/>
1541        <get src="http://repo2.maven.org/maven2/com/google/guava/guava-testlib/${guava.version}/guava-testlib-${guava.version}-tests.jar"
1542             dest="${guava.dir}/guava-testlib-tests.jar" usetimestamp="true"/>
1543        <junit printsummary="true" showoutput="true" haltonfailure="true"
1544               jvm="${build.main.java}" fork="true">
1545          <jvmarg line="-ea -esa --patch-module=java.base=${product.jar}"/>
1546          <formatter type="brief"/>
1547          <classpath>
1548            <pathelement location="${guava.dir}/guava-testlib-tests.jar"/>
1549            <path refid="guava.testlib.classpath"/>
1550          </classpath>
1551    
1552          <!-- "6" in "OpenJdk6Tests" misleadingly means "6+" -->
1553          <test name="com.google.common.collect.testing.OpenJdk6Tests"/>
1554        </junit>
1555      </target>
1556    
1557  </project>  </project>

Legend:
Removed from v.1.216  
changed lines
  Added in v.1.258

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8