[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.224, Thu Nov 24 01:58:04 2016 UTC revision 1.267, Tue Feb 27 21:18:06 2018 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"
3      xmlns:unless="ant:unless"
4      xmlns:ivy="antlib:org.apache.ivy.ant">
5    
6    <description>    <description>
7  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
# Line 17  Line 19 
19    itself.  Because the JDK version matters and because different    itself.  Because the JDK version matters and because different
20    targets require different JDKs, we assume that users have created a    targets require different JDKs, we assume that users have created a
21    hierarchy containing:    hierarchy containing:
   $HOME/jdk/jdk6  
   $HOME/jdk/jdk7  
22    $HOME/jdk/jdk8    $HOME/jdk/jdk8
23    $HOME/jdk/jdk9    $HOME/jdk/jdk9
24      $HOME/jdk/jdk10
25      $HOME/jdk/jdk11
26    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  
27    $HOME/jdk/src/jdk8    $HOME/jdk/src/jdk8
28    $HOME/jdk/src/jdk9    $HOME/jdk/src/jdk9
29      $HOME/jdk/src/jdk10
30      $HOME/jdk/src/jdk11
31    where each of the above is a complete JDK source tree    where each of the above is a complete JDK source tree
32    (e.g. mercurial forest) or a symlink to same.    (e.g. mercurial forest) or a symlink to same.
33    
34    Alternatively, define ant variables thus:    Alternatively, define ant variables thus:
35    ant -Djdk$N.home=... -Djdk$N.src.home=...    ant -Djdk$N.home=... -Djdk$N.src.home=...
36    for $N in 6 7 8 9 ...    for $N in 8 9 10 ...
37    
38    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.  
39  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
40    </description>    </description>
41    
# Line 133  Line 134 
134    <defjdklocations v="7"/>    <defjdklocations v="7"/>
135    <defjdklocations v="8"/>    <defjdklocations v="8"/>
136    <defjdklocations v="9"/>    <defjdklocations v="9"/>
137      <defjdklocations v="10"/>
138      <defjdklocations v="11"/>
139    
140    <!-- Source locations -->    <!-- Source locations -->
141    <property name="src.dir"              location="${basedir}/src/main"/>    <property name="src.dir"              location="${basedir}/src/main"/>
# Line 142  Line 145 
145    <property name="jtreg7.src.dir"       location="${test.src.dir}/jtreg-jdk7"/>    <property name="jtreg7.src.dir"       location="${test.src.dir}/jtreg-jdk7"/>
146    <property name="jtreg8.src.dir"       location="${test.src.dir}/jtreg-jdk8"/>    <property name="jtreg8.src.dir"       location="${test.src.dir}/jtreg-jdk8"/>
147    <property name="jtreg9.src.dir"       location="${test.src.dir}/jtreg"/>    <property name="jtreg9.src.dir"       location="${test.src.dir}/jtreg"/>
148      <property name="jtreg10.src.dir"      location="${test.src.dir}/jtreg"/>
149      <property name="jtreg11.src.dir"      location="${test.src.dir}/jtreg"/>
150    <property name="jtreg.src.dir"        location="${jtreg9.src.dir}"/>    <property name="jtreg.src.dir"        location="${jtreg9.src.dir}"/>
151    <property name="lib.dir"              location="${basedir}/lib"/>    <property name="lib.dir"              location="${basedir}/lib"/>
152    <property name="dist.dir"             location="${basedir}/dist"/>    <property name="dist.dir"             location="${basedir}/dist"/>
# Line 181  Line 186 
186    <property name="junit.jar"        location="${lib.dir}/junit.jar"/>    <property name="junit.jar"        location="${lib.dir}/junit.jar"/>
187    
188    <!-- Canonical location of jdk docs root, to use with javadoc -Xdocrootparent flag -->    <!-- Canonical location of jdk docs root, to use with javadoc -Xdocrootparent flag -->
189    <property name="java5.docroot.url"      value="http://docs.oracle.com/javase/1.5.0/docs"/>    <!-- Switched to https: in 2017-10 - JDK-8190312 -->
190    <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"/>
191    <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"/>
192    <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"/>
193    <!-- 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"/>
194    <!-- <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"/>
195    <property name="java9.docroot.url"      value="http://download.java.net/java/jdk9/docs"/>    <!-- The location of jdk9 early access docs (RIP) -->
196      <!-- <property name="java9.docroot.url" value="http://download.java.net/java/jdk9/docs"/> -->
197    <!-- Default jdk doc location (latest stable release seems best) -->    <!-- Default jdk doc location (latest stable release seems best) -->
198    <property name="java.docroot.url"       value="${java8.docroot.url}"/>    <property name="java10.docroot.url" value="http://download.java.net/java/jdk10/docs"/>
199      <property name="java11.docroot.url" value="http://download.java.net/java/jdk11/docs"/>
200      <property name="java.docroot.url"   value="${java9.docroot.url}"/>
201    
202    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
203    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>
# Line 197  Line 205 
205    <property name="java7.api.url"      value="${java7.docroot.url}/api/"/>    <property name="java7.api.url"      value="${java7.docroot.url}/api/"/>
206    <property name="java8.api.url"      value="${java8.docroot.url}/api/"/>    <property name="java8.api.url"      value="${java8.docroot.url}/api/"/>
207    <property name="java9.api.url"      value="${java9.docroot.url}/api/"/>    <property name="java9.api.url"      value="${java9.docroot.url}/api/"/>
208      <property name="java10.api.url"     value="${java10.docroot.url}/api/"/>
209      <property name="java11.api.url"     value="${java11.docroot.url}/api/"/>
210    <property name="java.api.url"       value="${java.docroot.url}/api/"/>    <property name="java.api.url"       value="${java.docroot.url}/api/"/>
211    
212    <!-- Define the "jtreg" task -->    <!-- Define the "jtreg" task -->
# Line 232  Line 242 
242        <available file="${jdk@{compile-target}.home}/jmods" type="dir"/>        <available file="${jdk@{compile-target}.home}/jmods" type="dir"/>
243      </condition>      </condition>
244    
245        <local name="use-doclint"/>
246        <condition property="use-doclint">
247          <not> <equals arg1="@{target}" arg2="7"/> </not>
248        </condition>
249    
250      <mkdir dir="@{workdir}/tck-classes"/>      <mkdir dir="@{workdir}/tck-classes"/>
251    
252      <javac srcdir="@{tck.src.dir}"      <javac srcdir="@{tck.src.dir}"
# Line 251  Line 266 
266        <include name="*.java"/>        <include name="*.java"/>
267        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
268        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>
269          <compilerarg value="-Xdoclint:reference/private" if:set="use-doclint"/>
270        <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>        <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
271        <compilerarg line="--patch-module java.base=${build.classes.dir}/java.base" if:set="modules"/>        <compilerarg value="--patch-module=java.base=@{classes}" if:set="modules"/>
272        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
273        <javac-elements/>        <javac-elements/>
274    
# Line 263  Line 279 
279            jvm="${java@{target}}"            jvm="${java@{target}}"
280            fork="true">            fork="true">
281          <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>          <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
282          <jvmarg line="--patch-module java.base=${build.classes.dir}/java.base" if:set="modules"/>          <jvmarg value="--patch-module=java.base=@{classes}" if:set="modules"/>
283            <jvmarg value="--add-opens=java.base/java.lang=ALL-UNNAMED" if:set="modules"/>
284            <jvmarg value="--add-opens=java.base/java.util=ALL-UNNAMED" if:set="modules"/>
285            <jvmarg value="--add-opens=java.base/java.util.concurrent=ALL-UNNAMED" if:set="modules"/>
286            <jvmarg value="--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED" if:set="modules"/>
287            <jvmarg value="--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED" if:set="modules"/>
288          <jvmarg line="@{jvmflags}"/>          <jvmarg line="@{jvmflags}"/>
289          <!-- ant -Dvmoptions="-Xmx8m" -Djsr166.tckTestClass=CompletableFutureTest tck -->          <!-- ant -Dvmoptions="-Xmx8m" -Djsr166.tckTestClass=CompletableFutureTest tck -->
290          <jvmarg line="${vmoptions}" if:set="vmoptions"/>          <jvmarg line="${vmoptions}" if:set="vmoptions"/>
# Line 285  Line 306 
306    </macrodef>    </macrodef>
307    
308    <!-- Define jtreg test sets for different jdk versions -->    <!-- Define jtreg test sets for different jdk versions -->
309    <fileset dir="${jtreg9.src.dir}">    <!-- ant -Djtreg.test.pattern="**/ConcurrentHashMap/" -->
310      <patternset id="jdk9.jtreg.tests">    <!-- ant -Djtreg.test.pattern="**/ToArray.java" -->
311        <include name="**/*.java"/>    <property name="jtreg.test.pattern" value="**/*.java"/>
312      </patternset>    <macrodef name="defjtregtests">
313    </fileset>      <attribute name="v"/>
314        <sequential>
315    <fileset dir="${jtreg8.src.dir}">        <fileset dir="${jtreg@{v}.src.dir}">
316      <patternset id="jdk8.jtreg.tests">          <patternset id="jdk@{v}.jtreg.tests">
317        <include name="**/*.java"/>            <include name="${jtreg.test.pattern}"/>
       <exclude name="**/SpliteratorCharacteristics.java"/>  
       <!-- https://bugs.openjdk.java.net/browse/JDK-6842353 -->  
       <exclude name="**/GCDuringIteration.java"/>  
318      </patternset>      </patternset>
319    </fileset>    </fileset>
320        </sequential>
321      </macrodef>
322    
323    <fileset dir="${jtreg7.src.dir}">    <defjtregtests v="11"/>
324      <patternset id="jdk7.jtreg.tests">    <defjtregtests v="10"/>
325        <include name="**/*.java"/>    <defjtregtests v="9"/>
326      </patternset>    <defjtregtests v="8"/>
327    </fileset>    <defjtregtests v="7"/>
328    
329    <!-- ant -Djtreg.flags=-timeoutFactor:4 -->    <!-- ant -Djtreg.flags=-timeoutFactor:4 -->
330    <property name="jtreg.flags" value=""/>    <property name="jtreg.flags" value=""/>
331    
332    <macrodef name="run-jtreg-tests">    <macrodef name="run-jtreg-tests">
333      <!-- 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"/>  
334      <attribute name="target"/>      <attribute name="target"/>
335      <attribute name="workdir"/>      <attribute name="workdir"/>
336      <attribute name="classes"/>      <attribute name="classes"/>
337        <attribute name="verbose" default="${jtreg.verbose}"/>
338      <attribute name="jtregflags" default=""/>      <attribute name="jtregflags" default=""/>
339        <element name="jtreg-elements" optional="true"/>
340    
341      <sequential>      <sequential>
342    
# Line 333  Line 354 
354             workDir="@{workdir}/JTwork">             workDir="@{workdir}/JTwork">
355        <patternset refid="jdk@{target}.jtreg.tests"/>        <patternset refid="jdk@{target}.jtreg.tests"/>
356        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
357        <arg value="-javacoptions:--patch-module java.base=${build.classes.dir}/java.base" if:set="modules"/>        <arg value="-javacoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
358        <arg value="-vmoptions:--patch-module java.base=${build.classes.dir}/java.base" if:set="modules"/>        <arg value="-vmoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
359        <arg value="-agentvm"/>        <arg value="-agentvm"/>
360        <arg value="-noreport"/>        <arg value="-noreport"/>
361        <arg value="-verbose:${jtreg.verbose}"/>        <arg value="-verbose:@{verbose}"/>
362        <arg value="-vmoptions:-esa -ea"/>        <arg value="-vmoptions:-esa -ea"/>
363        <arg value="-automatic"/>        <arg value="-automatic"/>
364        <arg value="-k:!ignore"/>        <arg value="-k:!ignore"/>
365        <arg line="@{jtregflags}"/>        <arg line="@{jtregflags}"/>
366        <arg line="${jtreg.flags}"/>        <arg line="${jtreg.flags}"/>
367          <jtreg-elements/>
368      </jtreg>      </jtreg>
369      </sequential>      </sequential>
370    </macrodef>    </macrodef>
# Line 359  Line 381 
381    <!-- Main targets -->    <!-- Main targets -->
382    
383    <property name="build.main.java.version" value="9"/>    <property name="build.main.java.version" value="9"/>
384    <property name="build.main.javac" value="${javac9}"/>    <!-- Workaround "no nested properties in ant" -->
385      <macrodef name="define-build-main-properties">
386        <attribute name="v"/>
387        <sequential>
388          <property name="build.main.java"    value="${java@{v}}"/>
389          <property name="build.main.javac"   value="${javac@{v}}"/>
390          <!-- Force javadoc version to be at least 10,
391               so we can use override-methods=summary -->
392          <condition property="build.main.javadoc"
393                     value="${javadoc10}"
394                     else="${javadoc@{v}}">
395            <equals arg1="@{v}" arg2="9"/>
396          </condition>
397        </sequential>
398      </macrodef>
399      <define-build-main-properties v="${build.main.java.version}"/>
400    
401    <target name="dists"    <target name="dists"
402            depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"            depends="dist, 4jdk8dist"
403            description="Builds all public jars and docs"/>            description="Builds all public jars and docs"/>
404              <!--
405                  depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"
406              -->
407    
408    <target name="compile"    <target name="compile"
409            depends="configure-compiler"            depends="configure-compiler"
410            description="Compiles src/main sources to build dir">            description="Compiles src/main sources to build dir">
411    
     <local name="modules"/>  
     <condition property="modules">  
       <and>  
         <available file="${jdk9.home}/jmods" type="dir"/>  
         <equals arg1="9" arg2="${build.main.java.version}"/>  
       </and>  
     </condition>  
   
412      <local name="destdir"/>      <local name="destdir"/>
413      <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"/>  
414    
415      <mkdir dir="${destdir}"/>      <mkdir dir="${destdir}"/>
416    
# Line 396  Line 427 
427             fork="true">             fork="true">
428    
429        <include name="**/*.java"/>        <include name="**/*.java"/>
430        <compilerarg value="-Xmodule:java.base" if:set="modules"/>        <compilerarg value="--patch-module=java.base=${src.dir}"/>
431        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
432        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
433        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
434          <compilerarg line="--doclint-format html5"/>
435          <compilerarg value="-Xdoclint:all/protected,reference/private"/>
436        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
       <compilerarg value="-Xdoclint:all/protected"/>  
437        <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>        <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
438        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
439    
# Line 435  Line 467 
467    
468  <!--  TODO: sourcepath="${src.dir}:${jdk9.src.dir}" -->  <!--  TODO: sourcepath="${src.dir}:${jdk9.src.dir}" -->
469  <!--  TODO: sourcepath="${src.dir}:${jdk9.src.dir}:${jdk9.src.home}/jdk/src/java.logging/share/classes" -->  <!--  TODO: sourcepath="${src.dir}:${jdk9.src.dir}:${jdk9.src.home}/jdk/src/java.logging/share/classes" -->
470    <!-- TODO: sourcepath="${src.dir}:${jdk9.home}/src.zip" -->
471    <!-- TODO: <arg line="-sourcepath ${src.dir}:${jdk9.home}/src.zip"/> -->
472    <!-- TODO: <arg line="- -module-source-path ${jdk9.home}/src.zip"/> -->
473      <javadoc destdir="${docs.dir}"      <javadoc destdir="${docs.dir}"
474               packagenames="none"               packagenames="none"
475               link="${java9.api.url}"               link="${java9.api.url}"
# Line 442  Line 477 
477               access="${build.javadoc.access}"               access="${build.javadoc.access}"
478               sourcepath="${src.dir}"               sourcepath="${src.dir}"
479               classpath=""               classpath=""
480               executable="${javadoc9}">               source="9"
481                 executable="${build.main.javadoc}">
482        <fileset dir="${src.dir}" defaultexcludes="yes">        <fileset dir="${src.dir}" defaultexcludes="yes">
483          <include name="**/*.java"/>          <include name="**/*.java"/>
484        </fileset>        </fileset>
485        <arg line="-Xdocrootparent ${java9.docroot.url}"/>        <arg line="-Xdocrootparent ${java9.docroot.url}"/>
486        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
487        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
488        <arg value="-Xmodule:java.base"/>        <arg value="-html5"/>
489        <arg value="-tag"/>        <arg value="--patch-module=java.base=${src.dir}"/>
490        <arg value="${javadoc.jls.option}"/>        <arg value="--override-methods=summary"/>
491  <!-- @apiNote currently unused -->        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>
492  <!--       <arg value="-tag"/> -->        <arg value="-tag"/> <arg value="implSpec:a:Implementation Requirements:"/>
493  <!--       <arg value="apiNote:a:API Note:"/> -->        <arg value="-tag"/> <arg value="implNote:a:Implementation Note:"/>
494        <arg value="-tag"/>  <!-- @apiNote tag currently unused -->
495        <arg value="implSpec:a:Implementation Requirements:"/>  <!--  <arg value="-tag"/> <arg value="apiNote:a:API Note:"/> -->
       <arg value="-tag"/>  
       <arg value="implNote:a:Implementation Note:"/>  
496  <!-- tags added in jdk9: currently unused -->  <!-- tags added in jdk9: currently unused -->
497  <!--       <arg value="-tag"/> -->  <!--  <arg value="-tag"/> <arg value="revised:X"/> -->
498  <!--       <arg value="revised:X"/> -->  <!--  <arg value="-tag"/> <arg value="spec:X"/> -->
 <!--       <arg value="-tag"/> -->  
 <!--       <arg value="spec:X"/> -->  
499      </javadoc>      </javadoc>
500    </target>    </target>
501    
# Line 497  Line 529 
529    
530    <target name="clean"    <target name="clean"
531            description="Removes all build products">            description="Removes all build products">
   
532      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
   
533    </target>    </target>
534    
535    
536    <target name="dist-clean"    <target name="dist-clean"
537            description="Removes all build and distribution products">            description="Removes all build and distribution products">
   
538      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
539      <delete dir="${dist.dir}"/>      <delete dir="${dist.dir}"/>
   
540    </target>    </target>
541    
542    
# Line 529  Line 557 
557      <run-tck-tests      <run-tck-tests
558        target="${build.main.java.version}"        target="${build.main.java.version}"
559        workdir="${build.dir}"        workdir="${build.dir}"
560        classes="${product.jar}"/>        classes="${product.jar}">
561          <javac-elements>
562            <compilerarg value="-Werror"/>
563          </javac-elements>
564        </run-tck-tests>
565    </target>    </target>
566    
567    <target name="tck-parallelism-1"    <target name="tck-parallelism-1"
# Line 564  Line 596 
596    
597    <target name="test"    <target name="test"
598            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"
599            description="Runs tck and jtreg tests for src/main">            description="Runs tck and jtreg tests for src/main"/>
   </target>  
600    
601  <!--   <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->  <!--   <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->
602    
# Line 576  Line 607 
607    
608  <!--   </target> -->  <!--   </target> -->
609    
610  <!--   <target name="test89" -->    <target name="test91011"
611  <!--           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">
612    
613  <!--     <antcall target="clean"/> -->      <antcall target="clean"/>
614  <!--     <antcall target="test"> -->      <antcall target="test">
615  <!--       <param name="build.main.java.version" value="8"/> -->        <param name="build.main.java.version" value="9"/>
616  <!--       <param name="build.main.javac" value="${javac8}"/> -->      </antcall>
 <!--     </antcall> -->  
617    
618  <!--     <antcall target="clean"/> -->      <antcall target="clean"/>
619  <!--     <antcall target="test"> -->      <antcall target="test">
620  <!--       <param name="build.main.java.version" value="9"/> -->        <param name="build.main.java.version" value="10"/>
621  <!--       <param name="build.main.javac" value="${javac9}"/> -->      </antcall>
 <!--     </antcall> -->  
622    
623  <!--   </target> -->      <antcall target="clean"/>
624        <antcall target="test">
625          <param name="build.main.java.version" value="11"/>
626        </antcall>
627    
628        <!-- Clean up to avoid obscure wrong class file version bugs -->
629        <antcall target="clean"/>
630    
631      </target>
632    
633    
634    
635    <target name="configure-compiler">    <target name="configure-compiler">
636      <fail message="ant version too old">      <fail message="ant version too old">
637        <condition>        <condition> <not> <antversion atleast="1.9.1"/> </not> </condition>
         <not> <antversion atleast="1.9.1"/> </not>  
       </condition>  
638      </fail>      </fail>
639    
640      <property name="unchecked.option" value="-Xlint:unchecked"/>      <property name="unchecked.option" value="-Xlint:unchecked"/>
# Line 645  Line 680 
680      <java classname="ALoops" fork="true">      <java classname="ALoops" fork="true">
681        <classpath refid="loops.classpath"/>        <classpath refid="loops.classpath"/>
682      </java>      </java>
   
683    </target>    </target>
684    
685    
686    <target name="compile-test-loops" depends="jar"    <target name="compile-test-loops" depends="jar"
687            description="compile all the perf tests in src/test/loops">            description="Compiles all the perf tests in src/test/loops">
688    
689      <mkdir dir="${build.dir}/test/loops"/>      <mkdir dir="${build.dir}/test/loops"/>
690    
# Line 662  Line 696 
696             includeAntRuntime="false"             includeAntRuntime="false"
697             includeJavaRuntime="false"             includeJavaRuntime="false"
698             encoding="ASCII"             encoding="ASCII"
699             executable="${javac9}"             executable="${build.main.javac}"
700             fork="true">             fork="true">
701    
702        <include name="*.java"/>        <include name="*.java"/>
# Line 670  Line 704 
704        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
705        <compilerarg value="-Xbootclasspath/p:${product.jar}"/>        <compilerarg value="-Xbootclasspath/p:${product.jar}"/>
706        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
707      </javac>      </javac>
   
708    </target>    </target>
709    
710    
# Line 698  Line 730 
730             encoding="ASCII"             encoding="ASCII"
731             executable="${javac8}"             executable="${javac8}"
732             fork="true">             fork="true">
   
733        <include name="**/*.java"/>        <include name="**/*.java"/>
734        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
735        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
736        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
737        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
738        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
739      </javac>      </javac>
740    </target>    </target>
741    
# Line 729  Line 759 
759             encoding="ASCII"             encoding="ASCII"
760             executable="${javac8}"             executable="${javac8}"
761             fork="true">             fork="true">
   
762        <include name="**/*.java"/>        <include name="**/*.java"/>
763        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
764        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
765        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
766        <compilerarg value="-Xdoclint:all/protected"/>        <compilerarg value="-Xdoclint:all/protected,reference/private"/>
767        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
768      </javac>      </javac>
769    </target>    </target>
770    
# Line 752  Line 780 
780          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
781        </manifest>        </manifest>
782      </jar>      </jar>
   
783    </target>    </target>
784    
785    
# Line 768  Line 795 
795          <!-- JDK9+ test classes -->          <!-- JDK9+ test classes -->
796          <exclude name="*9Test.java"/>          <exclude name="*9Test.java"/>
797          <exclude name="*10Test.java"/>          <exclude name="*10Test.java"/>
798            <compilerarg value="-Werror"/>
799        </javac-elements>        </javac-elements>
800      </run-tck-tests>      </run-tck-tests>
801    </target>    </target>
# Line 785  Line 813 
813    
814    <target name="4jdk8-test"    <target name="4jdk8-test"
815            depends="4jdk8-tck, 4jdk8-jtreg"            depends="4jdk8-tck, 4jdk8-jtreg"
816            description="Runs tck and jtreg tests for jsr166-4jdk8">            description="Runs tck and jtreg tests for jsr166-4jdk8"/>
   </target>  
817    
818    
819    <target name="4jdk8docs"    <target name="4jdk8docs"
# Line 802  Line 829 
829               access="${build.javadoc.access}"               access="${build.javadoc.access}"
830               sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"               sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"
831               classpath=""               classpath=""
832                 source="8"
833               executable="${javadoc8}"               executable="${javadoc8}"
834               failonerror = "true">               failonerror = "true">
835        <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">        <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">
# Line 809  Line 837 
837        </fileset>        </fileset>
838        <arg line="-Xdocrootparent ${java8.docroot.url}"/>        <arg line="-Xdocrootparent ${java8.docroot.url}"/>
839        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
840        <arg value="-tag"/>        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>
841        <arg value="${javadoc.jls.option}"/>        <arg value="-tag"/> <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
842  <!-- @apiNote currently unused -->        <arg value="-tag"/> <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
843  <!--       <arg value="-tag"/> -->  <!-- @apiNote tag currently unused -->
844  <!--       <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/> -->  <!--  <arg value="-tag"/> <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/> -->
       <arg value="-tag"/>  
       <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>  
       <arg value="-tag"/>  
       <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>  
845      </javadoc>      </javadoc>
846    </target>    </target>
847    
# Line 829  Line 853 
853    
854    <target name="4jdk8clean"    <target name="4jdk8clean"
855            description="Removes all 4jdk8 build products">            description="Removes all 4jdk8 build products">
   
856      <delete dir="${build.4jdk8.dir}"/>      <delete dir="${build.4jdk8.dir}"/>
   
857    </target>    </target>
858    
859    
# Line 847  Line 869 
869    </target>    </target>
870    
871    
872      <!-- jsr166 4jdk7 (no longer maintained) -->
873    
874    <!-- jsr166 4jdk7 -->    <target name="4jdk7compile" depends="configure-compiler">
   
   <target name="4jdk7compile"  
           depends="configure-compiler"  
           description="Compiles src/jdk7 sources, targeting jdk7">  
   
875      <mkdir dir="${build.4jdk7.classes.dir}"/>      <mkdir dir="${build.4jdk7.classes.dir}"/>
876    
877      <javac srcdir="${4jdk7src.dir}"      <javac srcdir="${4jdk7src.dir}"
# Line 877  Line 895 
895        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
896        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
897        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
898      </javac>      </javac>
899    </target>    </target>
900    
901    <target name="4jdk7doclint"    <target name="4jdk7doclint" depends="configure-compiler">
           depends="configure-compiler"  
           description="Finds doclint warnings">  
   
902      <mkdir dir="${build.4jdk7.classes.dir}"/>      <mkdir dir="${build.4jdk7.classes.dir}"/>
903    
904      <javac srcdir="${4jdk7src.dir}"      <javac srcdir="${4jdk7src.dir}"
# Line 908  Line 922 
922        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
923        <compilerarg value="-Xdoclint:all/protected"/>        <compilerarg value="-Xdoclint:all/protected"/>
924        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
925      </javac>      </javac>
926    </target>    </target>
927    
928      <target name="4jdk7jar" depends="4jdk7compile">
   <target name="4jdk7jar"  
           depends="4jdk7compile"  
           description="Builds library jar from compiled sources">  
   
929      <jar destfile="${4jdk7product.jar}">      <jar destfile="${4jdk7product.jar}">
930        <fileset dir="${build.4jdk7.classes.dir}"/>        <fileset dir="${build.4jdk7.classes.dir}"/>
931        <manifest>        <manifest>
# Line 924  Line 933 
933          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
934        </manifest>        </manifest>
935      </jar>      </jar>
   
936    </target>    </target>
937    
938      <target name="4jdk7-tck" depends="4jdk7jar">
   <target name="4jdk7-tck"  
           depends="4jdk7jar"  
           description="Runs tck tests for jsr166-4jdk7 directly">  
   
939      <run-tck-tests      <run-tck-tests
940        target="7"        target="7"
941        workdir="${build.4jdk7.dir}"        workdir="${build.4jdk7.dir}"
# Line 949  Line 953 
953          <exclude name="SplittableRandomTest.java"/>          <exclude name="SplittableRandomTest.java"/>
954          <exclude name="StampedLockTest.java"/>          <exclude name="StampedLockTest.java"/>
955          <exclude name="SubmissionPublisherTest.java"/>          <exclude name="SubmissionPublisherTest.java"/>
956            <compilerarg value="-Werror"/>
957        </javac-elements>        </javac-elements>
958      </run-tck-tests>      </run-tck-tests>
959    </target>    </target>
960    
   
961    <!-- Runs tck tests for jsr166-4jdk7 via junit task (dead experiment) -->    <!-- Runs tck tests for jsr166-4jdk7 via junit task (dead experiment) -->
962    <target name="4jdk7-tck-junit"    <target name="4jdk7-tck-junit" depends="4jdk7compile">
           depends="4jdk7compile">  
963    
964      <junit printsummary="true"      <junit printsummary="true"
965             showoutput="true"             showoutput="true"
# Line 978  Line 981 
981    
982        <test name="${jsr166.tckTestClass}" haltonfailure="no">        <test name="${jsr166.tckTestClass}" haltonfailure="no">
983        </test>        </test>
   
984      </junit>      </junit>
985    </target>    </target>
986    
987    <target name="4jdk7-jtreg"    <target name="4jdk7-jtreg" depends="4jdk7jar">
           depends="4jdk7jar"  
           description="Runs jtreg tests for jsr166-4jdk7 using the jtreg ant task">  
988      <run-jtreg-tests      <run-jtreg-tests
989         target="7"         target="7"
990         workdir="${build.4jdk7.dir}"         workdir="${build.4jdk7.dir}"
991         classes="${4jdk7product.jar}"/>         classes="${4jdk7product.jar}"/>
992    </target>    </target>
993    
994      <target name="4jdk7-test" depends="4jdk7-tck, 4jdk7-jtreg"/>
995    
996    <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">  
   
997      <delete dir="${4jdk7docs.dir}"/>      <delete dir="${4jdk7docs.dir}"/>
998      <mkdir dir="${4jdk7docs.dir}"/>      <mkdir dir="${4jdk7docs.dir}"/>
999    
# Line 1021  Line 1014 
1014      </javadoc>      </javadoc>
1015    </target>    </target>
1016    
1017      <target name="4jdk7dist" depends="4jdk7dist-jar, 4jdk7dist-docs"/>
1018    
1019    <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">  
   
1020      <delete dir="${build.4jdk7.dir}"/>      <delete dir="${build.4jdk7.dir}"/>
   
1021    </target>    </target>
1022    
1023      <target name="4jdk7dist-jar" depends="4jdk7clean, 4jdk7jar">
   <target name="4jdk7dist-jar"  
           depends="4jdk7clean, 4jdk7jar">  
1024      <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>      <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>
1025    </target>    </target>
1026    
1027      <target name="4jdk7dist-docs" depends="4jdk7clean, 4jdk7docs">
   <target name="4jdk7dist-docs"  
           depends="4jdk7clean, 4jdk7docs">  
1028      <mirror-dir src="${4jdk7docs.dir}" dst="${dist.4jdk7docs.dir}"/>      <mirror-dir src="${4jdk7docs.dir}" dst="${dist.4jdk7docs.dir}"/>
1029    </target>    </target>
1030    
1031    
1032    <!-- jsr166x -->    <!-- jsr166x (no longer maintained) -->
   
   <target name="jsr166xcompile"  
           depends="configure-compiler"  
           description="Compiles jsr166x sources to build dir">  
1033    
1034      <target name="jsr166xcompile" depends="configure-compiler">
1035      <mkdir dir="${build.jsr166x.classes.dir}"/>      <mkdir dir="${build.jsr166x.classes.dir}"/>
1036    
1037      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1069  Line 1048 
1048             encoding="ASCII"             encoding="ASCII"
1049             executable="${javac7}"             executable="${javac7}"
1050             fork="true">             fork="true">
   
1051        <include name="jsr166x/**/*.java"/>        <include name="jsr166x/**/*.java"/>
1052        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
1053        <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>
1054        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1055        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1056      </javac>      </javac>
1057    </target>    </target>
1058    
1059      <target name="jsr166xjar" depends="jsr166xcompile">
   <target name="jsr166xjar"  
           depends="jsr166xcompile"  
           description="Builds library jar from compiled sources">  
   
1060      <jar destfile="${jsr166x.jar}">      <jar destfile="${jsr166x.jar}">
1061        <fileset dir="${build.jsr166x.classes.dir}"/>        <fileset dir="${build.jsr166x.classes.dir}"/>
1062        <manifest>        <manifest>
# Line 1091  Line 1064 
1064          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1065        </manifest>        </manifest>
1066      </jar>      </jar>
   
1067    </target>    </target>
1068    
1069      <target name="jsr166xdocs">
   <target name="jsr166xdocs"  
           description="Builds javadocs to dist dir">  
   
1070      <delete dir="${jsr166xdocs.dir}"/>      <delete dir="${jsr166xdocs.dir}"/>
1071      <mkdir dir="${jsr166xdocs.dir}"/>      <mkdir dir="${jsr166xdocs.dir}"/>
1072    
# Line 1112  Line 1081 
1081               failonerror = "true">               failonerror = "true">
1082        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1083        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1084      </javadoc>      </javadoc>
1085    </target>    </target>
1086    
1087      <target name="jsr166xdist" depends="jsr166xdist-jar, jsr166xdist-docs"/>
1088    
1089    <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">  
   
1090      <delete dir="${build.jsr166x.dir}"/>      <delete dir="${build.jsr166x.dir}"/>
   
1091    </target>    </target>
1092    
1093      <target name="jsr166xdist-jar" depends="jsr166xclean, jsr166xjar">
   <target name="jsr166xdist-jar"  
           depends="jsr166xclean, jsr166xjar">  
1094      <copy file="${jsr166x.jar}" todir="${dist.dir}"/>      <copy file="${jsr166x.jar}" todir="${dist.dir}"/>
1095    </target>    </target>
1096    
1097    <target name="jsr166xdist-docs"    <target name="jsr166xdist-docs" depends="jsr166xclean, jsr166xdocs">
           depends="jsr166xclean, jsr166xdocs">  
1098      <mirror-dir src="${jsr166xdocs.dir}" dst="${dist.jsr166xdocs.dir}"/>      <mirror-dir src="${jsr166xdocs.dir}" dst="${dist.jsr166xdocs.dir}"/>
1099    </target>    </target>
1100    
   <!-- jsr166y -->  
   
1101    
1102    <target name="jsr166ycompile"    <!-- jsr166y (no longer maintained) -->
           depends="configure-compiler"  
           description="Compiles jsr166y sources">  
1103    
1104      <target name="jsr166ycompile" depends="configure-compiler">
1105      <mkdir dir="${build.jsr166y.classes.dir}"/>      <mkdir dir="${build.jsr166y.classes.dir}"/>
1106    
1107      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1169  Line 1124 
1124        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
1125        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1126        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1127      </javac>      </javac>
1128    </target>    </target>
1129    
1130      <target name="jsr166yjar" depends="jsr166ycompile">
   <target name="jsr166yjar"  
           depends="jsr166ycompile"  
           description="Builds library jar from compiled sources">  
   
1131      <jar destfile="${jsr166y.jar}" index="true">      <jar destfile="${jsr166y.jar}" index="true">
1132        <fileset dir="${build.jsr166y.classes.dir}"/>        <fileset dir="${build.jsr166y.classes.dir}"/>
1133        <manifest>        <manifest>
# Line 1185  Line 1135 
1135          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1136        </manifest>        </manifest>
1137      </jar>      </jar>
   
1138    </target>    </target>
1139    
1140      <target name="jsr166ydocs">
   <target name="jsr166ydocs"  
           description="Builds javadocs to dist dir">  
   
1141      <delete dir="${jsr166ydocs.dir}"/>      <delete dir="${jsr166ydocs.dir}"/>
1142      <mkdir dir="${jsr166ydocs.dir}"/>      <mkdir dir="${jsr166ydocs.dir}"/>
1143    
# Line 1206  Line 1152 
1152               failonerror = "true">               failonerror = "true">
1153        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1154        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1155      </javadoc>      </javadoc>
1156    </target>    </target>
1157    
1158      <target name="jsr166ydist" depends="jsr166ydist-jar, jsr166ydist-docs"/>
1159    
1160    <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">  
   
1161      <delete dir="${build.jsr166y.dir}"/>      <delete dir="${build.jsr166y.dir}"/>
   
1162    </target>    </target>
1163    
1164      <target name="jsr166ydist-jar" depends="jsr166yclean, jsr166yjar">
   <target name="jsr166ydist-jar"  
           depends="jsr166yclean, jsr166yjar">  
1165      <copy file="${jsr166y.jar}" todir="${dist.dir}"/>      <copy file="${jsr166y.jar}" todir="${dist.dir}"/>
1166    </target>    </target>
1167    
1168    <target name="jsr166ydist-docs"    <target name="jsr166ydist-docs" depends="jsr166yclean, jsr166ydocs">
           depends="jsr166yclean, jsr166ydocs">  
1169      <mirror-dir src="${jsr166ydocs.dir}" dst="${dist.jsr166ydocs.dir}"/>      <mirror-dir src="${jsr166ydocs.dir}" dst="${dist.jsr166ydocs.dir}"/>
1170    </target>    </target>
1171    
1172    
1173    <!-- extra166y -->    <!-- extra166y (no longer maintained) -->
   
   
   <target name="extra166ycompile"  
           depends="configure-compiler, jsr166yjar"  
           description="Compiles extra166y sources">  
1174    
1175      <target name="extra166ycompile" depends="configure-compiler, jsr166yjar">
1176      <mkdir dir="${build.extra166y.classes.dir}"/>      <mkdir dir="${build.extra166y.classes.dir}"/>
1177    
1178      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1264  Line 1195 
1195        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
1196        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1197        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1198      </javac>      </javac>
1199    </target>    </target>
1200    
1201      <target name="extra166yjar" depends="extra166ycompile">
   <target name="extra166yjar"  
           depends="extra166ycompile"  
           description="Builds library jar from compiled sources">  
   
1202      <jar destfile="${extra166y.jar}" index="true">      <jar destfile="${extra166y.jar}" index="true">
1203        <fileset dir="${build.extra166y.classes.dir}"/>        <fileset dir="${build.extra166y.classes.dir}"/>
1204        <manifest>        <manifest>
# Line 1280  Line 1206 
1206          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1207        </manifest>        </manifest>
1208      </jar>      </jar>
   
1209    </target>    </target>
1210    
1211      <target name="extra166ydocs">
   <target name="extra166ydocs"  
           description="Builds javadocs to build dir">  
   
1212      <delete dir="${extra166ydocs.dir}"/>      <delete dir="${extra166ydocs.dir}"/>
1213      <mkdir dir="${extra166ydocs.dir}"/>      <mkdir dir="${extra166ydocs.dir}"/>
1214    
# Line 1300  Line 1222 
1222               executable="${javadoc7}">               executable="${javadoc7}">
1223        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1224        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1225      </javadoc>      </javadoc>
1226    </target>    </target>
1227    
1228      <target name="extra166ydist" depends="extra166ydist-jar, extra166ydist-docs"/>
1229    
1230    <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">  
   
1231      <delete dir="${build.extra166y.dir}"/>      <delete dir="${build.extra166y.dir}"/>
   
1232    </target>    </target>
1233    
1234      <target name="extra166ydist-jar" depends="extra166yclean, extra166yjar">
   <target name="extra166ydist-jar"  
           depends="extra166yclean, extra166yjar">  
1235      <copy file="${extra166y.jar}" todir="${dist.dir}"/>      <copy file="${extra166y.jar}" todir="${dist.dir}"/>
1236    </target>    </target>
1237    
1238    <target name="extra166ydist-docs"    <target name="extra166ydist-docs" depends="extra166yclean, extra166ydocs">
           depends="extra166yclean, extra166ydocs">  
1239      <mirror-dir src="${extra166ydocs.dir}" dst="${dist.extra166ydocs.dir}"/>      <mirror-dir src="${extra166ydocs.dir}" dst="${dist.extra166ydocs.dir}"/>
1240    </target>    </target>
1241    
1242    <!-- jsr166e -->  
1243      <!-- jsr166e (no longer maintained) -->
1244    
1245    <property name="build.jsr166e.java.version" value="6"/>    <property name="build.jsr166e.java.version" value="6"/>
1246    <property name="build.jsr166e.javac" value="${javac6}"/>    <property name="build.jsr166e.javac" value="${javac6}"/>
1247    
1248    <target name="jsr166ecompile"    <target name="jsr166ecompile" depends="configure-compiler">
           depends="configure-compiler"  
           description="Compiles jsr166e sources">  
   
1249      <mkdir dir="${build.jsr166e.classes.dir}"/>      <mkdir dir="${build.jsr166e.classes.dir}"/>
1250    
1251      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1357  Line 1266 
1266        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
1267        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1268        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1269      </javac>      </javac>
1270    </target>    </target>
1271    
   <!-- jsr166e: find doclint errors -->  
1272    <target name="jsr166edoclint">    <target name="jsr166edoclint">
   
1273      <mkdir dir="${build.jsr166e.classes.dir}"/>      <mkdir dir="${build.jsr166e.classes.dir}"/>
1274    
1275      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1385  Line 1291 
1291        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
1292        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1293        <compilerarg value="-Xdoclint:all/protected"/>        <compilerarg value="-Xdoclint:all/protected"/>
   
1294      </javac>      </javac>
1295    </target>    </target>
1296    
1297      <target name="jsr166ejar" depends="jsr166ecompile">
   <target name="jsr166ejar"  
           depends="jsr166ecompile"  
           description="Builds library jar from compiled sources">  
   
1298      <jar destfile="${jsr166e.jar}" index="true">      <jar destfile="${jsr166e.jar}" index="true">
1299        <fileset dir="${build.jsr166e.classes.dir}"/>        <fileset dir="${build.jsr166e.classes.dir}"/>
1300        <manifest>        <manifest>
# Line 1401  Line 1302 
1302          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1303        </manifest>        </manifest>
1304      </jar>      </jar>
   
1305    </target>    </target>
1306    
1307      <target name="jsr166edocs">
   <target name="jsr166edocs"  
           description="Builds javadocs to build dir">  
   
1308      <delete dir="${jsr166edocs.dir}"/>      <delete dir="${jsr166edocs.dir}"/>
1309      <mkdir dir="${jsr166edocs.dir}"/>      <mkdir dir="${jsr166edocs.dir}"/>
1310    
# Line 1421  Line 1318 
1318               failonerror = "true">               failonerror = "true">
1319        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1320        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1321      </javadoc>      </javadoc>
1322    </target>    </target>
1323    
1324      <target name="jsr166e-tck-one-java-version" depends="jsr166ejar">
   <target name="jsr166e-tck-one-java-version"  
           depends="jsr166ejar">  
   
1325      <echo message="Testing with jdk${build.jsr166e.java.version} ..."/>      <echo message="Testing with jdk${build.jsr166e.java.version} ..."/>
   
1326      <run-tck-tests      <run-tck-tests
1327        tck.src.dir="${test.src.dir}/tck-jsr166e"        tck.src.dir="${test.src.dir}/tck-jsr166e"
1328        target="${build.jsr166e.java.version}"        target="${build.jsr166e.java.version}"
# Line 1438  Line 1330 
1330        classes="${jsr166e.jar}"/>        classes="${jsr166e.jar}"/>
1331    </target>    </target>
1332    
1333    <target name="jsr166e-tck"    <target name="jsr166e-tck">
           description="Runs tck tests for jsr166e for multiple java versions">  
1334    
1335  <!--     <antcall target="clean"/> -->  <!--     <antcall target="clean"/> -->
1336  <!--     <antcall target="jsr166e-tck-one-java-version"> -->  <!--     <antcall target="jsr166e-tck-one-java-version"> -->
# Line 1460  Line 1351 
1351      </antcall>      </antcall>
1352    </target>    </target>
1353    
1354      <target name="jsr166e-test" depends="jsr166e-tck"/>
1355    
1356    <target name="jsr166e-test"    <target name="jsr166edist" depends="jsr166edist-jar, jsr166edist-docs"/>
           depends="jsr166e-tck"  
           description="Runs all tests for jsr166e">  
   </target>  
1357    
1358    <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">  
1359      <delete dir="${build.jsr166e.dir}"/>      <delete dir="${build.jsr166e.dir}"/>
1360    </target>    </target>
1361    
   
1362    <target name="jsr166edist-jar"    <target name="jsr166edist-jar"
1363            depends="jsr166eclean, jsr166ejar">            depends="jsr166eclean, jsr166ejar">
1364      <copy file="${jsr166e.jar}" todir="${dist.dir}"/>      <copy file="${jsr166e.jar}" todir="${dist.dir}"/>
1365    </target>    </target>
1366    
1367    <target name="jsr166edist-docs"    <target name="jsr166edist-docs" depends="jsr166eclean, jsr166edocs">
           depends="jsr166eclean, jsr166edocs">  
1368      <mirror-dir src="${jsr166edocs.dir}" dst="${dist.jsr166edocs.dir}"/>      <mirror-dir src="${jsr166edocs.dir}" dst="${dist.jsr166edocs.dir}"/>
1369    </target>    </target>
1370    
# Line 1504  Line 1385 
1385    </target>    </target>
1386    
1387    
1388    <!-- ==============================================================
1389      Experimental errorprone support - http://errorprone.info
1390    =================================================================== -->
1391      <property name="errorprone.jar" location="${lib.dir}/error_prone_ant-2.2.0.jar"/>
1392      <property name="errorprone.jsr166.user.flags" value=""/>
1393      <property name="errorprone.jsr166.flags"
1394                value="-Xep:HashtableContains:OFF
1395                       -Xep:JdkObsolete:OFF
1396                       -Xep:MissingOverride:OFF
1397                       -Xep:MissingFail:OFF
1398                       -Xep:MixedArrayDimensions:ERROR
1399                       -Xep:RemoveUnusedImports:ERROR
1400                       -Xep:EmptyIf:ERROR
1401                       -Xep:MultipleTopLevelClasses:ERROR
1402                       -Xep:ClassName:ERROR
1403                       -Xep:LongLiteralLowerCaseSuffix:ERROR
1404                       -Xep:RedundantThrows:ERROR
1405                       -Xep:IdentityBinaryExpression:WARN
1406                       -Xep:MethodCanBeStatic:WARN
1407                       ${errorprone.jsr166.user.flags}"/>
1408      <!-- -Xep:WildcardImport:ERROR -->
1409      <property name="errorprone.jsr166.test.flags"
1410                value="-Xep:StringSplitter:OFF
1411                       -Xep:BoxedPrimitiveConstructor:OFF
1412                       -Xep:ModifyingCollectionWithItself:OFF"/>
1413      <!-- ant -emacs errorprone |& grep -EA1 '(warning|error):|warnings' -->
1414      <target name="errorprone"
1415              depends="clean, configure-compiler"
1416              description="Run errorprone over jsr166 source code (experimental)">
1417    
1418        <local name="destdir"/>
1419        <property name="destdir" value="${build.classes.dir}/java.base"/>
1420        <mkdir dir="${destdir}"/>
1421    
1422        <javac srcdir="${src.dir}"
1423               destdir="${destdir}"
1424               debug="${build.debug}"
1425               debuglevel="${build.debuglevel}"
1426               deprecation="${build.deprecation}"
1427               classpath=""
1428               includeAntRuntime="false"
1429               includeJavaRuntime="false"
1430               encoding="ASCII"
1431               executable="${build.main.javac}"
1432               fork="true">
1433    
1434          <include name="**/*.java"/>
1435          <compilerarg value="-XDcompilePolicy=simple"/>
1436          <compilerarg line="-processorpath ${errorprone.jar}"/>
1437          <compilerarg value="-Xplugin:ErrorProne
1438                              ${errorprone.jsr166.flags}"/>
1439          <compilerarg value="--patch-module=java.base=${src.dir}"/>
1440          <compilerarg value="-Xprefer:source"/>
1441          <compilerarg value="-XDignore.symbol.file=true"/>
1442          <compilerarg value="-Xlint:all"/>
1443          <compilerarg value="-Xdoclint:all/protected,reference/private"/>
1444          <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1445          <compilerarg line="${build.args}"/>
1446        </javac>
1447    
1448        <jar destfile="${product.jar}">
1449          <fileset dir="${destdir}"/>
1450        </jar>
1451    
1452        <run-tck-tests
1453          target="${build.main.java.version}"
1454          workdir="${build.dir}"
1455          classes="${product.jar}">
1456          <javac-elements>
1457            <compilerarg value="-XDcompilePolicy=simple"/>
1458            <compilerarg line="-processorpath ${errorprone.jar}"/>
1459            <compilerarg value="-Xplugin:ErrorProne
1460                                ${errorprone.jsr166.flags}
1461                                ${errorprone.jsr166.test.flags}"/>
1462            <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1463          </javac-elements>
1464        </run-tck-tests>
1465      </target>
1466    
1467      <!-- ant -emacs errorprone-jtreg |& grep -EA1 '(warning|error):' -->
1468      <!-- -XDcompilePolicy=simple or byfile avoids confusing UnusedImports -->
1469      <target name="errorprone-jtreg"
1470              depends="jar"
1471              description="Run errorprone over jtreg tests (experimental)">
1472    
1473        <run-jtreg-tests
1474           target="${build.main.java.version}"
1475           workdir="${build.dir}"
1476           classes="${product.jar}"
1477           verbose="all">
1478          <jtreg-elements>
1479            <arg value="-javacoption:-XDcompilePolicy=simple"/>
1480            <arg value="-javacoption:-processorpath"/>
1481            <arg value="-javacoption:${errorprone.jar}"/>
1482            <arg value="-javacoption:-Xplugin:ErrorProne
1483                                ${errorprone.jsr166.flags}
1484                                ${errorprone.jsr166.test.flags}
1485                                -Xep:NonAtomicVolatileUpdate:OFF"/>
1486          </jtreg-elements>
1487        </run-jtreg-tests>
1488      </target>
1489    
1490    
1491    <!-- ==============================================================
1492      Running guava tests against jsr166 code
1493    =================================================================== -->
1494    
1495    <!-- <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" -->
1496    <!--   organisation="com.google.guava" module="guava-testlib" revision="21.0"/> -->
1497    <!-- <property name="guava.version" value="21.0"/> -->
1498    
1499    <!-- HOWTO debug print a path id -->
1500    <!-- <pathconvert property="guava.testlib.classpath" refid="guava.testlib.classpath" /> -->
1501    <!-- <echo message="guava.testlib.classpath=${guava.testlib.classpath}"/> -->
1502    
1503    <!-- <ivy:retrieve pathid="guava.tests.classpath" type="jar" inline="true" conf="*" pattern="${lib.dir}/[type]/[artifact].[ext]" -->
1504    <!--   organisation="com.google.guava" module="guava-tests"/> -->
1505    <!-- <get src="http://repo2.maven.org/maven2/com/google/guava/guava-tests/${guava.version}/guava-tests-${guava.version}-tests.jar" -->
1506    <!--   dest="${lib.dir}/jar/guava-tests-tests.jar" usetimestamp="true"/> -->
1507    <!--     <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" type="*" -->
1508    <!--       organisation="com.google.guava" module="guava-testlib" revision="${guava.version}"/> -->
1509    
1510    <!-- <test name="com.google.common.collect.testing.TestsForQueuesInJavaUtil"/> -->
1511    <!-- <test name="com.google.common.collect.testing.TestsForListsInJavaUtil"/> -->
1512    <!-- <test name="com.google.common.collect.testing.TestsForSetsInJavaUtil"/> -->
1513    <!-- <test name="com.google.common.collect.testing.TestsForMapsInJavaUtil"/> -->
1514    
1515    <!-- <ivy:retrieve pathid="guava.testlib.classpath" -->
1516    <!--   type="*" inline="true" conf="*(private),*(public)" -->
1517    <!--   pattern="${guava.dir}/[artifact].[ext]" -->
1518    <!--   organisation="com.google.guava" module="guava-testlib"/> -->
1519    
1520    <!-- Work around bug below by downloading guava-testlib-tests.jar "by hand": -->
1521    <!-- https://issues.apache.org/jira/browse/IVY-1444 -->
1522    <!-- maven tests artifacts cannot be downloaded because they are mapped to private configurations -->
1523    
1524      <target name="init-ivy">
1525        <get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar"
1526             dest="${build.dir}/ivy.jar" usetimestamp="true" skipexisting="true"/>
1527        <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant"
1528                 classpath="${build.dir}/ivy.jar"/>
1529      </target>
1530    
1531      <target name="guava-tests" depends="jar, init-ivy"
1532              description="Guava tests run against jsr166 collections">
1533        <property name="guava.dir" value="${build.dir}/guava-testlib"/>
1534        <mkdir dir="${guava.dir}"/>
1535        <ivy:retrieve pathid="guava.testlib.classpath"
1536          type="jar,bundle" inline="true" conf="default,master"
1537          pattern="${guava.dir}/[artifact].[ext]"
1538          organisation="com.google.guava" module="guava-testlib"/>
1539        <property name="guava.version" value="21.0"/>
1540        <get src="http://repo2.maven.org/maven2/com/google/guava/guava-testlib/${guava.version}/guava-testlib-${guava.version}-tests.jar"
1541             dest="${guava.dir}/guava-testlib-tests.jar" usetimestamp="true"/>
1542        <junit printsummary="true" showoutput="true" haltonfailure="true"
1543               jvm="${build.main.java}" fork="true">
1544          <jvmarg line="-ea -esa --patch-module=java.base=${product.jar}"/>
1545          <formatter type="brief"/>
1546          <classpath>
1547            <pathelement location="${guava.dir}/guava-testlib-tests.jar"/>
1548            <path refid="guava.testlib.classpath"/>
1549          </classpath>
1550    
1551          <!-- "6" in "OpenJdk6Tests" misleadingly means "6+" -->
1552          <test name="com.google.common.collect.testing.OpenJdk6Tests"/>
1553        </junit>
1554      </target>
1555    
1556  </project>  </project>

Legend:
Removed from v.1.224  
changed lines
  Added in v.1.267

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8