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

Diff of /jsr166/build.xml

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

revision 1.236 by jsr166, Mon Mar 20 00:03:57 2017 UTC revision 1.272 by jsr166, Sun Jun 3 16:16:47 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">    xmlns:ivy="antlib:org.apache.ivy.ant">
5    
6    <description>    <description>
# Line 18  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/jdk7  
22    $HOME/jdk/jdk8    $HOME/jdk/jdk8
23    $HOME/jdk/jdk9    $HOME/jdk/jdk9
24    $HOME/jdk/jdk10    $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/jdk7  
27    $HOME/jdk/src/jdk8    $HOME/jdk/src/jdk8
28    $HOME/jdk/src/jdk9    $HOME/jdk/src/jdk9
29    $HOME/jdk/src/jdk10    $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 7 8 9 10 ...    for $N in 8 9 10 ...
37    
38    As of 2016-03, the sources in src/main are for jdk9+ only.    As of 2016-03, the sources in src/main are for jdk9+ only.
39  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
# Line 134  Line 135 
135    <defjdklocations v="8"/>    <defjdklocations v="8"/>
136    <defjdklocations v="9"/>    <defjdklocations v="9"/>
137    <defjdklocations v="10"/>    <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 144  Line 146 
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"/>    <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 183  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"/>    <property name="java10.docroot.url" value="https://docs.oracle.com/javase/10/docs"/>
196      <!-- The location of jdk early access docs (RIP) -->
197      <!-- <property name="java9.docroot.url" value="http://download.java.net/java/jdk9/docs"/> -->
198      <!-- <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    <!-- Default jdk doc location (latest stable release seems best) -->    <!-- Default jdk doc location (latest stable release seems best) -->
201    <property name="java.docroot.url"       value="${java8.docroot.url}"/>    <property name="java.docroot.url"   value="${java10.docroot.url}"/>
202    
203    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
204    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>
# Line 199  Line 206 
206    <property name="java7.api.url"      value="${java7.docroot.url}/api/"/>    <property name="java7.api.url"      value="${java7.docroot.url}/api/"/>
207    <property name="java8.api.url"      value="${java8.docroot.url}/api/"/>    <property name="java8.api.url"      value="${java8.docroot.url}/api/"/>
208    <property name="java9.api.url"      value="${java9.docroot.url}/api/"/>    <property name="java9.api.url"      value="${java9.docroot.url}/api/"/>
209      <property name="java10.api.url"     value="${java10.docroot.url}/api/"/>
210      <property name="java11.api.url"     value="${java11.docroot.url}/api/"/>
211    <property name="java.api.url"       value="${java.docroot.url}/api/"/>    <property name="java.api.url"       value="${java.docroot.url}/api/"/>
212    
213    <!-- Define the "jtreg" task -->    <!-- Define the "jtreg" task -->
# Line 234  Line 243 
243        <available file="${jdk@{compile-target}.home}/jmods" type="dir"/>        <available file="${jdk@{compile-target}.home}/jmods" type="dir"/>
244      </condition>      </condition>
245    
246        <local name="use-doclint"/>
247        <condition property="use-doclint">
248          <not> <equals arg1="@{target}" arg2="7"/> </not>
249        </condition>
250    
251      <mkdir dir="@{workdir}/tck-classes"/>      <mkdir dir="@{workdir}/tck-classes"/>
252    
253      <javac srcdir="@{tck.src.dir}"      <javac srcdir="@{tck.src.dir}"
# Line 253  Line 267 
267        <include name="*.java"/>        <include name="*.java"/>
268        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
269        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>
270        <compilerarg value="-Xdoclint:reference/private"/>        <compilerarg value="-Xdoclint:reference/private" if:set="use-doclint"/>
271        <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>        <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
272        <compilerarg value="--patch-module=java.base=@{classes}" if:set="modules"/>        <compilerarg value="--patch-module=java.base=@{classes}" if:set="modules"/>
273        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
# Line 293  Line 307 
307    </macrodef>    </macrodef>
308    
309    <!-- Define jtreg test sets for different jdk versions -->    <!-- Define jtreg test sets for different jdk versions -->
310    <fileset dir="${jtreg9.src.dir}">    <!-- ant -Djtreg.test.pattern="**/ConcurrentHashMap/" -->
311      <patternset id="jdk9.jtreg.tests">    <!-- ant -Djtreg.test.pattern="**/ToArray.java" -->
312        <include name="**/*.java"/>    <property name="jtreg.test.pattern" value="**/*.java"/>
313      </patternset>    <macrodef name="defjtregtests">
314    </fileset>      <attribute name="v"/>
315        <sequential>
316    <fileset dir="${jtreg8.src.dir}">        <fileset dir="${jtreg@{v}.src.dir}">
317      <patternset id="jdk8.jtreg.tests">          <patternset id="jdk@{v}.jtreg.tests">
318        <include name="**/*.java"/>            <include name="${jtreg.test.pattern}"/>
319      </patternset>          </patternset>
320    </fileset>        </fileset>
321        </sequential>
322      </macrodef>
323    
324    <fileset dir="${jtreg7.src.dir}">    <defjtregtests v="11"/>
325      <patternset id="jdk7.jtreg.tests">    <defjtregtests v="10"/>
326        <include name="**/*.java"/>    <defjtregtests v="9"/>
327      </patternset>    <defjtregtests v="8"/>
328    </fileset>    <defjtregtests v="7"/>
329    
330    <!-- ant -Djtreg.flags=-timeoutFactor:4 -->    <!-- ant -Djtreg.flags=-timeoutFactor:4 -->
331    <property name="jtreg.flags" value=""/>    <property name="jtreg.flags" value=""/>
332    
333    <macrodef name="run-jtreg-tests">    <macrodef name="run-jtreg-tests">
334      <!-- 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"/>  
335      <attribute name="target"/>      <attribute name="target"/>
336      <attribute name="workdir"/>      <attribute name="workdir"/>
337      <attribute name="classes"/>      <attribute name="classes"/>
338        <attribute name="verbose" default="${jtreg.verbose}"/>
339      <attribute name="jtregflags" default=""/>      <attribute name="jtregflags" default=""/>
340        <element name="jtreg-elements" optional="true"/>
341    
342      <sequential>      <sequential>
343    
# Line 338  Line 355 
355             workDir="@{workdir}/JTwork">             workDir="@{workdir}/JTwork">
356        <patternset refid="jdk@{target}.jtreg.tests"/>        <patternset refid="jdk@{target}.jtreg.tests"/>
357        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
358        <arg value="-javacoptions:--patch-module java.base=@{classes}" if:set="modules"/>        <arg value="-javacoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
359        <arg value="-vmoptions:--patch-module java.base=@{classes}" if:set="modules"/>        <arg value="-vmoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
360        <arg value="-agentvm"/>        <arg value="-agentvm"/>
361        <arg value="-noreport"/>        <arg value="-noreport"/>
362        <arg value="-verbose:${jtreg.verbose}"/>        <arg value="-verbose:@{verbose}"/>
363        <arg value="-vmoptions:-esa -ea"/>        <arg value="-vmoptions:-esa -ea"/>
364        <arg value="-automatic"/>        <arg value="-automatic"/>
365        <arg value="-k:!ignore"/>        <arg value="-k:!ignore"/>
366        <arg line="@{jtregflags}"/>        <arg line="@{jtregflags}"/>
367        <arg line="${jtreg.flags}"/>        <arg line="${jtreg.flags}"/>
368          <jtreg-elements/>
369      </jtreg>      </jtreg>
370      </sequential>      </sequential>
371    </macrodef>    </macrodef>
# Line 364  Line 382 
382    <!-- Main targets -->    <!-- Main targets -->
383    
384    <property name="build.main.java.version" value="9"/>    <property name="build.main.java.version" value="9"/>
385    <property name="build.main.javac" value="${javac9}"/>    <!-- Workaround "no nested properties in ant" -->
386      <macrodef name="define-build-main-properties">
387        <attribute name="v"/>
388        <sequential>
389          <property name="build.main.java"    value="${java@{v}}"/>
390          <property name="build.main.javac"   value="${javac@{v}}"/>
391          <!-- Force javadoc version to be at least 10,
392               so we can use override-methods=summary -->
393          <condition property="build.main.javadoc"
394                     value="${javadoc11}"
395                     else="${javadoc@{v}}">
396            <equals arg1="@{v}" arg2="9"/>
397          </condition>
398        </sequential>
399      </macrodef>
400      <define-build-main-properties v="${build.main.java.version}"/>
401    
402    <target name="dists"    <target name="dists"
403            depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"            depends="dist, 4jdk8dist"
404            description="Builds all public jars and docs"/>            description="Builds all public jars and docs"/>
405              <!--
406                  depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"
407              -->
408    
409    <target name="compile"    <target name="compile"
410            depends="configure-compiler"            depends="configure-compiler"
411            description="Compiles src/main sources to build dir">            description="Compiles src/main sources to build dir">
412    
     <local name="modules"/>  
     <condition property="modules">  
       <and>  
         <available file="${jdk9.home}/jmods" type="dir"/>  
         <equals arg1="9" arg2="${build.main.java.version}"/>  
       </and>  
     </condition>  
   
413      <local name="destdir"/>      <local name="destdir"/>
414      <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"/>  
415    
416      <mkdir dir="${destdir}"/>      <mkdir dir="${destdir}"/>
417    
# Line 401  Line 428 
428             fork="true">             fork="true">
429    
430        <include name="**/*.java"/>        <include name="**/*.java"/>
431        <compilerarg value="--patch-module=java.base=${src.dir}" if:set="modules"/>        <compilerarg value="--patch-module=java.base=${src.dir}"/>
432        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
433        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
434        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
435        <compilerarg value="-Werror"/>        <compilerarg line="--doclint-format html5"/>
436        <compilerarg value="-Xdoclint:all/protected,reference/private"/>        <compilerarg value="-Xdoclint:all/protected,reference/private"/>
437          <compilerarg value="-Werror"/>
438        <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>        <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
439        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
440    
# Line 450  Line 478 
478               access="${build.javadoc.access}"               access="${build.javadoc.access}"
479               sourcepath="${src.dir}"               sourcepath="${src.dir}"
480               classpath=""               classpath=""
481               executable="${javadoc9}">               source="9"
482                 executable="${build.main.javadoc}">
483        <fileset dir="${src.dir}" defaultexcludes="yes">        <fileset dir="${src.dir}" defaultexcludes="yes">
484          <include name="**/*.java"/>          <include name="**/*.java"/>
485        </fileset>        </fileset>
486        <arg line="-Xdocrootparent ${java9.docroot.url}"/>        <arg line="-Xdocrootparent ${java9.docroot.url}"/>
487        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
488        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
489          <arg value="-html5"/>
490        <arg value="--patch-module=java.base=${src.dir}"/>        <arg value="--patch-module=java.base=${src.dir}"/>
491        <arg value="-tag"/>        <arg value="--override-methods=summary"/>
492        <arg value="${javadoc.jls.option}"/>        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>
493  <!-- @apiNote currently unused -->        <arg value="-tag"/> <arg value="implSpec:a:Implementation Requirements:"/>
494  <!--       <arg value="-tag"/> -->        <arg value="-tag"/> <arg value="implNote:a:Implementation Note:"/>
495  <!--       <arg value="apiNote:a:API Note:"/> -->  <!-- @apiNote tag currently unused -->
496        <arg value="-tag"/>  <!--  <arg value="-tag"/> <arg value="apiNote:a:API Note:"/> -->
       <arg value="implSpec:a:Implementation Requirements:"/>  
       <arg value="-tag"/>  
       <arg value="implNote:a:Implementation Note:"/>  
497  <!-- tags added in jdk9: currently unused -->  <!-- tags added in jdk9: currently unused -->
498  <!--       <arg value="-tag"/> -->  <!--  <arg value="-tag"/> <arg value="revised:X"/> -->
499  <!--       <arg value="revised:X"/> -->  <!--  <arg value="-tag"/> <arg value="spec:X"/> -->
 <!--       <arg value="-tag"/> -->  
 <!--       <arg value="spec:X"/> -->  
500      </javadoc>      </javadoc>
501    </target>    </target>
502    
# Line 505  Line 530 
530    
531    <target name="clean"    <target name="clean"
532            description="Removes all build products">            description="Removes all build products">
   
533      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
   
534    </target>    </target>
535    
536    
537    <target name="dist-clean"    <target name="dist-clean"
538            description="Removes all build and distribution products">            description="Removes all build and distribution products">
   
539      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
540      <delete dir="${dist.dir}"/>      <delete dir="${dist.dir}"/>
   
541    </target>    </target>
542    
543    
# Line 576  Line 597 
597    
598    <target name="test"    <target name="test"
599            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"
600            description="Runs tck and jtreg tests for src/main">            description="Runs tck and jtreg tests for src/main"/>
   </target>  
601    
602  <!--   <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->  <!--   <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->
603    
# Line 588  Line 608 
608    
609  <!--   </target> -->  <!--   </target> -->
610    
611  <!--   <target name="test89" -->    <target name="test91011"
612  <!--           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">
613    
614  <!--     <antcall target="clean"/> -->      <antcall target="clean"/>
615  <!--     <antcall target="test"> -->      <antcall target="test">
616  <!--       <param name="build.main.java.version" value="8"/> -->        <param name="build.main.java.version" value="9"/>
617  <!--       <param name="build.main.javac" value="${javac8}"/> -->      </antcall>
 <!--     </antcall> -->  
618    
619  <!--     <antcall target="clean"/> -->      <antcall target="clean"/>
620  <!--     <antcall target="test"> -->      <antcall target="test">
621  <!--       <param name="build.main.java.version" value="9"/> -->        <param name="build.main.java.version" value="10"/>
622  <!--       <param name="build.main.javac" value="${javac9}"/> -->      </antcall>
 <!--     </antcall> -->  
623    
624  <!--   </target> -->      <antcall target="clean"/>
625        <antcall target="test">
626          <param name="build.main.java.version" value="11"/>
627        </antcall>
628    
629        <!-- Clean up to avoid obscure wrong class file version bugs -->
630        <antcall target="clean"/>
631    
632      </target>
633    
634    
635    
636    <target name="configure-compiler">    <target name="configure-compiler">
637      <fail message="ant version too old">      <fail message="ant version too old">
638        <condition>        <condition> <not> <antversion atleast="1.9.1"/> </not> </condition>
         <not> <antversion atleast="1.9.1"/> </not>  
       </condition>  
639      </fail>      </fail>
640    
641      <property name="unchecked.option" value="-Xlint:unchecked"/>      <property name="unchecked.option" value="-Xlint:unchecked"/>
# Line 657  Line 681 
681      <java classname="ALoops" fork="true">      <java classname="ALoops" fork="true">
682        <classpath refid="loops.classpath"/>        <classpath refid="loops.classpath"/>
683      </java>      </java>
   
684    </target>    </target>
685    
686    
687    <target name="compile-test-loops" depends="jar"    <target name="compile-test-loops" depends="jar"
688            description="compile all the perf tests in src/test/loops">            description="Compiles all the perf tests in src/test/loops">
689    
690      <mkdir dir="${build.dir}/test/loops"/>      <mkdir dir="${build.dir}/test/loops"/>
691    
# Line 674  Line 697 
697             includeAntRuntime="false"             includeAntRuntime="false"
698             includeJavaRuntime="false"             includeJavaRuntime="false"
699             encoding="ASCII"             encoding="ASCII"
700             executable="${javac9}"             executable="${build.main.javac}"
701             fork="true">             fork="true">
702    
703        <include name="*.java"/>        <include name="*.java"/>
# Line 682  Line 705 
705        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
706        <compilerarg value="-Xbootclasspath/p:${product.jar}"/>        <compilerarg value="-Xbootclasspath/p:${product.jar}"/>
707        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
708      </javac>      </javac>
   
709    </target>    </target>
710    
711    
# Line 710  Line 731 
731             encoding="ASCII"             encoding="ASCII"
732             executable="${javac8}"             executable="${javac8}"
733             fork="true">             fork="true">
   
734        <include name="**/*.java"/>        <include name="**/*.java"/>
735        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
736        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
737        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
738        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
739        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
740      </javac>      </javac>
741    </target>    </target>
742    
# Line 741  Line 760 
760             encoding="ASCII"             encoding="ASCII"
761             executable="${javac8}"             executable="${javac8}"
762             fork="true">             fork="true">
   
763        <include name="**/*.java"/>        <include name="**/*.java"/>
764        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
765        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
766        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
767        <compilerarg value="-Xdoclint:all/protected,reference/private"/>        <compilerarg value="-Xdoclint:all/protected,reference/private"/>
768        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
769      </javac>      </javac>
770    </target>    </target>
771    
# Line 764  Line 781 
781          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
782        </manifest>        </manifest>
783      </jar>      </jar>
   
784    </target>    </target>
785    
786    
# Line 798  Line 814 
814    
815    <target name="4jdk8-test"    <target name="4jdk8-test"
816            depends="4jdk8-tck, 4jdk8-jtreg"            depends="4jdk8-tck, 4jdk8-jtreg"
817            description="Runs tck and jtreg tests for jsr166-4jdk8">            description="Runs tck and jtreg tests for jsr166-4jdk8"/>
   </target>  
818    
819    
820    <target name="4jdk8docs"    <target name="4jdk8docs"
# Line 815  Line 830 
830               access="${build.javadoc.access}"               access="${build.javadoc.access}"
831               sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"               sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"
832               classpath=""               classpath=""
833                 source="8"
834               executable="${javadoc8}"               executable="${javadoc8}"
835               failonerror = "true">               failonerror = "true">
836        <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">        <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">
# Line 822  Line 838 
838        </fileset>        </fileset>
839        <arg line="-Xdocrootparent ${java8.docroot.url}"/>        <arg line="-Xdocrootparent ${java8.docroot.url}"/>
840        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
841        <arg value="-tag"/>        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>
842        <arg value="${javadoc.jls.option}"/>        <arg value="-tag"/> <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
843  <!-- @apiNote currently unused -->        <arg value="-tag"/> <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
844  <!--       <arg value="-tag"/> -->  <!-- @apiNote tag currently unused -->
845  <!--       <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;"/>  
846      </javadoc>      </javadoc>
847    </target>    </target>
848    
# Line 842  Line 854 
854    
855    <target name="4jdk8clean"    <target name="4jdk8clean"
856            description="Removes all 4jdk8 build products">            description="Removes all 4jdk8 build products">
   
857      <delete dir="${build.4jdk8.dir}"/>      <delete dir="${build.4jdk8.dir}"/>
   
858    </target>    </target>
859    
860    
# Line 860  Line 870 
870    </target>    </target>
871    
872    
873      <!-- jsr166 4jdk7 (no longer maintained) -->
874    
875    <!-- jsr166 4jdk7 -->    <target name="4jdk7compile" depends="configure-compiler">
   
   <target name="4jdk7compile"  
           depends="configure-compiler"  
           description="Compiles src/jdk7 sources, targeting jdk7">  
   
876      <mkdir dir="${build.4jdk7.classes.dir}"/>      <mkdir dir="${build.4jdk7.classes.dir}"/>
877    
878      <javac srcdir="${4jdk7src.dir}"      <javac srcdir="${4jdk7src.dir}"
# Line 890  Line 896 
896        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
897        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
898        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
899      </javac>      </javac>
900    </target>    </target>
901    
902    <target name="4jdk7doclint"    <target name="4jdk7doclint" depends="configure-compiler">
           depends="configure-compiler"  
           description="Finds doclint warnings">  
   
903      <mkdir dir="${build.4jdk7.classes.dir}"/>      <mkdir dir="${build.4jdk7.classes.dir}"/>
904    
905      <javac srcdir="${4jdk7src.dir}"      <javac srcdir="${4jdk7src.dir}"
# Line 921  Line 923 
923        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
924        <compilerarg value="-Xdoclint:all/protected"/>        <compilerarg value="-Xdoclint:all/protected"/>
925        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
926      </javac>      </javac>
927    </target>    </target>
928    
929      <target name="4jdk7jar" depends="4jdk7compile">
   <target name="4jdk7jar"  
           depends="4jdk7compile"  
           description="Builds library jar from compiled sources">  
   
930      <jar destfile="${4jdk7product.jar}">      <jar destfile="${4jdk7product.jar}">
931        <fileset dir="${build.4jdk7.classes.dir}"/>        <fileset dir="${build.4jdk7.classes.dir}"/>
932        <manifest>        <manifest>
# Line 937  Line 934 
934          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
935        </manifest>        </manifest>
936      </jar>      </jar>
   
937    </target>    </target>
938    
939      <target name="4jdk7-tck" depends="4jdk7jar">
   <target name="4jdk7-tck"  
           depends="4jdk7jar"  
           description="Runs tck tests for jsr166-4jdk7 directly">  
   
940      <run-tck-tests      <run-tck-tests
941        target="7"        target="7"
942        workdir="${build.4jdk7.dir}"        workdir="${build.4jdk7.dir}"
# Line 967  Line 959 
959      </run-tck-tests>      </run-tck-tests>
960    </target>    </target>
961    
   
962    <!-- Runs tck tests for jsr166-4jdk7 via junit task (dead experiment) -->    <!-- Runs tck tests for jsr166-4jdk7 via junit task (dead experiment) -->
963    <target name="4jdk7-tck-junit"    <target name="4jdk7-tck-junit" depends="4jdk7compile">
           depends="4jdk7compile">  
964    
965      <junit printsummary="true"      <junit printsummary="true"
966             showoutput="true"             showoutput="true"
# Line 992  Line 982 
982    
983        <test name="${jsr166.tckTestClass}" haltonfailure="no">        <test name="${jsr166.tckTestClass}" haltonfailure="no">
984        </test>        </test>
   
985      </junit>      </junit>
986    </target>    </target>
987    
988    <target name="4jdk7-jtreg"    <target name="4jdk7-jtreg" depends="4jdk7jar">
           depends="4jdk7jar"  
           description="Runs jtreg tests for jsr166-4jdk7 using the jtreg ant task">  
989      <run-jtreg-tests      <run-jtreg-tests
990         target="7"         target="7"
991         workdir="${build.4jdk7.dir}"         workdir="${build.4jdk7.dir}"
992         classes="${4jdk7product.jar}"/>         classes="${4jdk7product.jar}"/>
993    </target>    </target>
994    
995      <target name="4jdk7-test" depends="4jdk7-tck, 4jdk7-jtreg"/>
996    
997    <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">  
   
998      <delete dir="${4jdk7docs.dir}"/>      <delete dir="${4jdk7docs.dir}"/>
999      <mkdir dir="${4jdk7docs.dir}"/>      <mkdir dir="${4jdk7docs.dir}"/>
1000    
# Line 1035  Line 1015 
1015      </javadoc>      </javadoc>
1016    </target>    </target>
1017    
1018      <target name="4jdk7dist" depends="4jdk7dist-jar, 4jdk7dist-docs"/>
1019    
1020    <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">  
   
1021      <delete dir="${build.4jdk7.dir}"/>      <delete dir="${build.4jdk7.dir}"/>
   
1022    </target>    </target>
1023    
1024      <target name="4jdk7dist-jar" depends="4jdk7clean, 4jdk7jar">
   <target name="4jdk7dist-jar"  
           depends="4jdk7clean, 4jdk7jar">  
1025      <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>      <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>
1026    </target>    </target>
1027    
1028      <target name="4jdk7dist-docs" depends="4jdk7clean, 4jdk7docs">
   <target name="4jdk7dist-docs"  
           depends="4jdk7clean, 4jdk7docs">  
1029      <mirror-dir src="${4jdk7docs.dir}" dst="${dist.4jdk7docs.dir}"/>      <mirror-dir src="${4jdk7docs.dir}" dst="${dist.4jdk7docs.dir}"/>
1030    </target>    </target>
1031    
1032    
1033    <!-- jsr166x -->    <!-- jsr166x (no longer maintained) -->
   
   <target name="jsr166xcompile"  
           depends="configure-compiler"  
           description="Compiles jsr166x sources to build dir">  
1034    
1035      <target name="jsr166xcompile" depends="configure-compiler">
1036      <mkdir dir="${build.jsr166x.classes.dir}"/>      <mkdir dir="${build.jsr166x.classes.dir}"/>
1037    
1038      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1083  Line 1049 
1049             encoding="ASCII"             encoding="ASCII"
1050             executable="${javac7}"             executable="${javac7}"
1051             fork="true">             fork="true">
   
1052        <include name="jsr166x/**/*.java"/>        <include name="jsr166x/**/*.java"/>
1053        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
1054        <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>
1055        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1056        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1057      </javac>      </javac>
1058    </target>    </target>
1059    
1060      <target name="jsr166xjar" depends="jsr166xcompile">
   <target name="jsr166xjar"  
           depends="jsr166xcompile"  
           description="Builds library jar from compiled sources">  
   
1061      <jar destfile="${jsr166x.jar}">      <jar destfile="${jsr166x.jar}">
1062        <fileset dir="${build.jsr166x.classes.dir}"/>        <fileset dir="${build.jsr166x.classes.dir}"/>
1063        <manifest>        <manifest>
# Line 1105  Line 1065 
1065          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1066        </manifest>        </manifest>
1067      </jar>      </jar>
   
1068    </target>    </target>
1069    
1070      <target name="jsr166xdocs">
   <target name="jsr166xdocs"  
           description="Builds javadocs to dist dir">  
   
1071      <delete dir="${jsr166xdocs.dir}"/>      <delete dir="${jsr166xdocs.dir}"/>
1072      <mkdir dir="${jsr166xdocs.dir}"/>      <mkdir dir="${jsr166xdocs.dir}"/>
1073    
# Line 1126  Line 1082 
1082               failonerror = "true">               failonerror = "true">
1083        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1084        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1085      </javadoc>      </javadoc>
1086    </target>    </target>
1087    
1088      <target name="jsr166xdist" depends="jsr166xdist-jar, jsr166xdist-docs"/>
1089    
1090    <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">  
   
1091      <delete dir="${build.jsr166x.dir}"/>      <delete dir="${build.jsr166x.dir}"/>
   
1092    </target>    </target>
1093    
1094      <target name="jsr166xdist-jar" depends="jsr166xclean, jsr166xjar">
   <target name="jsr166xdist-jar"  
           depends="jsr166xclean, jsr166xjar">  
1095      <copy file="${jsr166x.jar}" todir="${dist.dir}"/>      <copy file="${jsr166x.jar}" todir="${dist.dir}"/>
1096    </target>    </target>
1097    
1098    <target name="jsr166xdist-docs"    <target name="jsr166xdist-docs" depends="jsr166xclean, jsr166xdocs">
           depends="jsr166xclean, jsr166xdocs">  
1099      <mirror-dir src="${jsr166xdocs.dir}" dst="${dist.jsr166xdocs.dir}"/>      <mirror-dir src="${jsr166xdocs.dir}" dst="${dist.jsr166xdocs.dir}"/>
1100    </target>    </target>
1101    
   <!-- jsr166y -->  
   
1102    
1103    <target name="jsr166ycompile"    <!-- jsr166y (no longer maintained) -->
           depends="configure-compiler"  
           description="Compiles jsr166y sources">  
1104    
1105      <target name="jsr166ycompile" depends="configure-compiler">
1106      <mkdir dir="${build.jsr166y.classes.dir}"/>      <mkdir dir="${build.jsr166y.classes.dir}"/>
1107    
1108      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1183  Line 1125 
1125        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
1126        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1127        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1128      </javac>      </javac>
1129    </target>    </target>
1130    
1131      <target name="jsr166yjar" depends="jsr166ycompile">
   <target name="jsr166yjar"  
           depends="jsr166ycompile"  
           description="Builds library jar from compiled sources">  
   
1132      <jar destfile="${jsr166y.jar}" index="true">      <jar destfile="${jsr166y.jar}" index="true">
1133        <fileset dir="${build.jsr166y.classes.dir}"/>        <fileset dir="${build.jsr166y.classes.dir}"/>
1134        <manifest>        <manifest>
# Line 1199  Line 1136 
1136          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1137        </manifest>        </manifest>
1138      </jar>      </jar>
   
1139    </target>    </target>
1140    
1141      <target name="jsr166ydocs">
   <target name="jsr166ydocs"  
           description="Builds javadocs to dist dir">  
   
1142      <delete dir="${jsr166ydocs.dir}"/>      <delete dir="${jsr166ydocs.dir}"/>
1143      <mkdir dir="${jsr166ydocs.dir}"/>      <mkdir dir="${jsr166ydocs.dir}"/>
1144    
# Line 1220  Line 1153 
1153               failonerror = "true">               failonerror = "true">
1154        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1155        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1156      </javadoc>      </javadoc>
1157    </target>    </target>
1158    
1159      <target name="jsr166ydist" depends="jsr166ydist-jar, jsr166ydist-docs"/>
1160    
1161    <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">  
   
1162      <delete dir="${build.jsr166y.dir}"/>      <delete dir="${build.jsr166y.dir}"/>
   
1163    </target>    </target>
1164    
1165      <target name="jsr166ydist-jar" depends="jsr166yclean, jsr166yjar">
   <target name="jsr166ydist-jar"  
           depends="jsr166yclean, jsr166yjar">  
1166      <copy file="${jsr166y.jar}" todir="${dist.dir}"/>      <copy file="${jsr166y.jar}" todir="${dist.dir}"/>
1167    </target>    </target>
1168    
1169    <target name="jsr166ydist-docs"    <target name="jsr166ydist-docs" depends="jsr166yclean, jsr166ydocs">
           depends="jsr166yclean, jsr166ydocs">  
1170      <mirror-dir src="${jsr166ydocs.dir}" dst="${dist.jsr166ydocs.dir}"/>      <mirror-dir src="${jsr166ydocs.dir}" dst="${dist.jsr166ydocs.dir}"/>
1171    </target>    </target>
1172    
1173    
1174    <!-- extra166y -->    <!-- extra166y (no longer maintained) -->
   
   
   <target name="extra166ycompile"  
           depends="configure-compiler, jsr166yjar"  
           description="Compiles extra166y sources">  
1175    
1176      <target name="extra166ycompile" depends="configure-compiler, jsr166yjar">
1177      <mkdir dir="${build.extra166y.classes.dir}"/>      <mkdir dir="${build.extra166y.classes.dir}"/>
1178    
1179      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1278  Line 1196 
1196        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
1197        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1198        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1199      </javac>      </javac>
1200    </target>    </target>
1201    
1202      <target name="extra166yjar" depends="extra166ycompile">
   <target name="extra166yjar"  
           depends="extra166ycompile"  
           description="Builds library jar from compiled sources">  
   
1203      <jar destfile="${extra166y.jar}" index="true">      <jar destfile="${extra166y.jar}" index="true">
1204        <fileset dir="${build.extra166y.classes.dir}"/>        <fileset dir="${build.extra166y.classes.dir}"/>
1205        <manifest>        <manifest>
# Line 1294  Line 1207 
1207          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1208        </manifest>        </manifest>
1209      </jar>      </jar>
   
1210    </target>    </target>
1211    
1212      <target name="extra166ydocs">
   <target name="extra166ydocs"  
           description="Builds javadocs to build dir">  
   
1213      <delete dir="${extra166ydocs.dir}"/>      <delete dir="${extra166ydocs.dir}"/>
1214      <mkdir dir="${extra166ydocs.dir}"/>      <mkdir dir="${extra166ydocs.dir}"/>
1215    
# Line 1314  Line 1223 
1223               executable="${javadoc7}">               executable="${javadoc7}">
1224        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1225        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1226      </javadoc>      </javadoc>
1227    </target>    </target>
1228    
1229      <target name="extra166ydist" depends="extra166ydist-jar, extra166ydist-docs"/>
1230    
1231    <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">  
   
1232      <delete dir="${build.extra166y.dir}"/>      <delete dir="${build.extra166y.dir}"/>
   
1233    </target>    </target>
1234    
1235      <target name="extra166ydist-jar" depends="extra166yclean, extra166yjar">
   <target name="extra166ydist-jar"  
           depends="extra166yclean, extra166yjar">  
1236      <copy file="${extra166y.jar}" todir="${dist.dir}"/>      <copy file="${extra166y.jar}" todir="${dist.dir}"/>
1237    </target>    </target>
1238    
1239    <target name="extra166ydist-docs"    <target name="extra166ydist-docs" depends="extra166yclean, extra166ydocs">
           depends="extra166yclean, extra166ydocs">  
1240      <mirror-dir src="${extra166ydocs.dir}" dst="${dist.extra166ydocs.dir}"/>      <mirror-dir src="${extra166ydocs.dir}" dst="${dist.extra166ydocs.dir}"/>
1241    </target>    </target>
1242    
1243    <!-- jsr166e -->  
1244      <!-- jsr166e (no longer maintained) -->
1245    
1246    <property name="build.jsr166e.java.version" value="6"/>    <property name="build.jsr166e.java.version" value="6"/>
1247    <property name="build.jsr166e.javac" value="${javac6}"/>    <property name="build.jsr166e.javac" value="${javac6}"/>
1248    
1249    <target name="jsr166ecompile"    <target name="jsr166ecompile" depends="configure-compiler">
           depends="configure-compiler"  
           description="Compiles jsr166e sources">  
   
1250      <mkdir dir="${build.jsr166e.classes.dir}"/>      <mkdir dir="${build.jsr166e.classes.dir}"/>
1251    
1252      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1371  Line 1267 
1267        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
1268        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1269        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1270      </javac>      </javac>
1271    </target>    </target>
1272    
   <!-- jsr166e: find doclint errors -->  
1273    <target name="jsr166edoclint">    <target name="jsr166edoclint">
   
1274      <mkdir dir="${build.jsr166e.classes.dir}"/>      <mkdir dir="${build.jsr166e.classes.dir}"/>
1275    
1276      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1399  Line 1292 
1292        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
1293        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1294        <compilerarg value="-Xdoclint:all/protected"/>        <compilerarg value="-Xdoclint:all/protected"/>
   
1295      </javac>      </javac>
1296    </target>    </target>
1297    
1298      <target name="jsr166ejar" depends="jsr166ecompile">
   <target name="jsr166ejar"  
           depends="jsr166ecompile"  
           description="Builds library jar from compiled sources">  
   
1299      <jar destfile="${jsr166e.jar}" index="true">      <jar destfile="${jsr166e.jar}" index="true">
1300        <fileset dir="${build.jsr166e.classes.dir}"/>        <fileset dir="${build.jsr166e.classes.dir}"/>
1301        <manifest>        <manifest>
# Line 1415  Line 1303 
1303          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1304        </manifest>        </manifest>
1305      </jar>      </jar>
   
1306    </target>    </target>
1307    
1308      <target name="jsr166edocs">
   <target name="jsr166edocs"  
           description="Builds javadocs to build dir">  
   
1309      <delete dir="${jsr166edocs.dir}"/>      <delete dir="${jsr166edocs.dir}"/>
1310      <mkdir dir="${jsr166edocs.dir}"/>      <mkdir dir="${jsr166edocs.dir}"/>
1311    
# Line 1435  Line 1319 
1319               failonerror = "true">               failonerror = "true">
1320        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1321        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1322      </javadoc>      </javadoc>
1323    </target>    </target>
1324    
1325      <target name="jsr166e-tck-one-java-version" depends="jsr166ejar">
   <target name="jsr166e-tck-one-java-version"  
           depends="jsr166ejar">  
   
1326      <echo message="Testing with jdk${build.jsr166e.java.version} ..."/>      <echo message="Testing with jdk${build.jsr166e.java.version} ..."/>
   
1327      <run-tck-tests      <run-tck-tests
1328        tck.src.dir="${test.src.dir}/tck-jsr166e"        tck.src.dir="${test.src.dir}/tck-jsr166e"
1329        target="${build.jsr166e.java.version}"        target="${build.jsr166e.java.version}"
# Line 1452  Line 1331 
1331        classes="${jsr166e.jar}"/>        classes="${jsr166e.jar}"/>
1332    </target>    </target>
1333    
1334    <target name="jsr166e-tck"    <target name="jsr166e-tck">
           description="Runs tck tests for jsr166e for multiple java versions">  
1335    
1336  <!--     <antcall target="clean"/> -->  <!--     <antcall target="clean"/> -->
1337  <!--     <antcall target="jsr166e-tck-one-java-version"> -->  <!--     <antcall target="jsr166e-tck-one-java-version"> -->
# Line 1474  Line 1352 
1352      </antcall>      </antcall>
1353    </target>    </target>
1354    
1355      <target name="jsr166e-test" depends="jsr166e-tck"/>
1356    
1357    <target name="jsr166e-test"    <target name="jsr166edist" depends="jsr166edist-jar, jsr166edist-docs"/>
           depends="jsr166e-tck"  
           description="Runs all tests for jsr166e">  
   </target>  
   
   <target name="jsr166edist"  
           depends="jsr166edist-jar, jsr166edist-docs"  
           description="Puts all distributable products in single hierarchy"/>  
1358    
1359      <target name="jsr166eclean">
   <target name="jsr166eclean"  
           description="Removes all jsr166e build products">  
1360      <delete dir="${build.jsr166e.dir}"/>      <delete dir="${build.jsr166e.dir}"/>
1361    </target>    </target>
1362    
   
1363    <target name="jsr166edist-jar"    <target name="jsr166edist-jar"
1364            depends="jsr166eclean, jsr166ejar">            depends="jsr166eclean, jsr166ejar">
1365      <copy file="${jsr166e.jar}" todir="${dist.dir}"/>      <copy file="${jsr166e.jar}" todir="${dist.dir}"/>
1366    </target>    </target>
1367    
1368    <target name="jsr166edist-docs"    <target name="jsr166edist-docs" depends="jsr166eclean, jsr166edocs">
           depends="jsr166eclean, jsr166edocs">  
1369      <mirror-dir src="${jsr166edocs.dir}" dst="${dist.jsr166edocs.dir}"/>      <mirror-dir src="${jsr166edocs.dir}" dst="${dist.jsr166edocs.dir}"/>
1370    </target>    </target>
1371    
1372    
1373  <!-- Find buglets that can be detected by static build tools -->  <!-- Find buglets that can be detected by static build tools -->
1374    
1375    <target name="lint">  <!--   <target name="lint"> -->
1376      <antcall target="dists">  <!--     <antcall target="dists"> -->
1377        <param name="build.javadoc.access" value="public"/>  <!--       <param name="build.javadoc.access" value="protected"/> -->
1378      </antcall>  <!--     </antcall> -->
1379    </target>  <!--   </target> -->
1380    
1381  <!-- Generates all doclint warnings, even for private methods (rarely useful) -->  <!-- Generates all doclint warnings, even for private methods (rarely useful) -->
1382    <target name="lint-private">    <target name="doclint-private">
1383      <antcall target="dist">      <antcall target="dist">
1384        <param name="build.javadoc.access" value="private"/>        <param name="build.javadoc.access" value="private"/>
1385      </antcall>      </antcall>
# Line 1520  Line 1388 
1388    
1389  <!-- ==============================================================  <!-- ==============================================================
1390    Experimental errorprone support - http://errorprone.info    Experimental errorprone support - http://errorprone.info
   You may need to bring your own errorprone jar.  
1391  =================================================================== -->  =================================================================== -->
1392      <property name="errorprone.jar" location="${lib.dir}/error_prone_ant-2.3.1.jar"/>
1393      <property name="errorprone.jsr166.user.flags" value=""/>
1394      <property name="errorprone.jsr166.flags"
1395                value="-Xep:HashtableContains:OFF
1396                       -Xep:JdkObsolete:OFF
1397                       -Xep:MissingOverride:OFF
1398                       -Xep:MissingFail:OFF
1399                       -Xep:MixedArrayDimensions:ERROR
1400                       -Xep:RemoveUnusedImports:ERROR
1401                       -Xep:EmptyIf:ERROR
1402                       -Xep:MultipleTopLevelClasses:ERROR
1403                       -Xep:ClassName:ERROR
1404                       -Xep:LongLiteralLowerCaseSuffix:ERROR
1405                       -Xep:RedundantThrows:ERROR
1406                       -Xep:IdentityBinaryExpression:WARN
1407                       -Xep:MethodCanBeStatic:WARN
1408                       ${errorprone.jsr166.user.flags}"/>
1409      <!-- -Xep:WildcardImport:ERROR -->
1410      <property name="errorprone.jsr166.test.flags"
1411                value="-Xep:StringSplitter:OFF
1412                       -Xep:BoxedPrimitiveConstructor:OFF
1413                       -Xep:ModifyingCollectionWithItself:OFF"/>
1414      <!-- ant -emacs errorprone |& grep -EA1 '(warning|error):|warnings' -->
1415    <target name="errorprone"    <target name="errorprone"
1416            depends="clean, configure-compiler"            depends="clean, configure-compiler"
1417            description="Run errorprone over jsr166 source code">            description="Run errorprone over jsr166 source code (experimental)">
1418    
1419      <local name="destdir"/>      <local name="destdir"/>
1420      <property name="destdir" value="${build.classes.dir}/java.base"/>      <property name="destdir" value="${build.classes.dir}/java.base"/>
# Line 1543  Line 1433 
1433             fork="true">             fork="true">
1434    
1435        <include name="**/*.java"/>        <include name="**/*.java"/>
1436        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>        <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1437        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>        <compilerarg value="-J--illegal-access=permit"/>
1438        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"/>        <compilerarg value="-XDcompilePolicy=simple"/>
1439        <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>        <compilerarg line="-processorpath ${errorprone.jar}"/>
       <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>  
       <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"/>  
       <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>  
       <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>  
       <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>  
       <compilerarg line="-processorpath ${lib.dir}/error_prone_ant-2.0.20-SNAPSHOT.jar"/>  
1440        <compilerarg value="-Xplugin:ErrorProne        <compilerarg value="-Xplugin:ErrorProne
1441                            -Xep:IdentityBinaryExpression:WARN                            ${errorprone.jsr166.flags}"/>
                           -Xep:MissingOverride:OFF  
                           -Xep:MixedArrayDimensions:WARN  
                           -Xep:RemoveUnusedImports:ERROR  
                           -Xep:MethodCanBeStatic:WARN"/>  
1442        <compilerarg value="--patch-module=java.base=${src.dir}"/>        <compilerarg value="--patch-module=java.base=${src.dir}"/>
1443        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
1444        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
# Line 1577  Line 1457 
1457        workdir="${build.dir}"        workdir="${build.dir}"
1458        classes="${product.jar}">        classes="${product.jar}">
1459        <javac-elements>        <javac-elements>
1460          <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>          <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1461          <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>          <compilerarg value="-J--illegal-access=permit"/>
1462          <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"/>          <compilerarg value="-XDcompilePolicy=simple"/>
1463          <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>          <compilerarg line="-processorpath ${errorprone.jar}"/>
1464          <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>          <compilerarg value="-Xplugin:ErrorProne
1465          <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"/>                              ${errorprone.jsr166.flags}
1466          <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>                              ${errorprone.jsr166.test.flags}"/>
         <compilerarg value="-J--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>  
         <compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/>  
         <compilerarg line="-processorpath ${lib.dir}/error_prone_ant-2.0.20-SNAPSHOT.jar"/>  
         <compilerarg value="-Xplugin:ErrorProne  
                             -Xep:IdentityBinaryExpression:WARN  
                             -Xep:BoxedPrimitiveConstructor:OFF  
                             -Xep:HashtableContains:OFF  
                             -Xep:ModifyingCollectionWithItself:OFF  
                             -Xep:MissingOverride:OFF  
                             -Xep:MixedArrayDimensions:WARN  
                             -Xep:RemoveUnusedImports:ERROR  
                             -Xep:MethodCanBeStatic:WARN"/>  
1467          <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>          <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1468        </javac-elements>        </javac-elements>
1469      </run-tck-tests>      </run-tck-tests>
1470    </target>    </target>
1471    
1472      <!-- ant -emacs errorprone-jtreg |& grep -EA1 '(warning|error):' -->
1473      <!-- -XDcompilePolicy=simple or byfile avoids confusing UnusedImports -->
1474      <target name="errorprone-jtreg"
1475              depends="jar"
1476              description="Run errorprone over jtreg tests (experimental)">
1477    
1478        <run-jtreg-tests
1479           target="${build.main.java.version}"
1480           workdir="${build.dir}"
1481           classes="${product.jar}"
1482           verbose="all">
1483          <jtreg-elements>
1484            <arg value="-javacoption:-XDcompilePolicy=simple"/>
1485            <arg value="-javacoption:-processorpath"/>
1486            <arg value="-javacoption:${errorprone.jar}"/>
1487            <arg value="-javacoption:-Xplugin:ErrorProne
1488                                ${errorprone.jsr166.flags}
1489                                ${errorprone.jsr166.test.flags}
1490                                -Xep:MultipleTopLevelClasses:WARN
1491                                -Xep:NonAtomicVolatileUpdate:OFF"/>
1492          </jtreg-elements>
1493        </run-jtreg-tests>
1494      </target>
1495    
1496    
1497  <!-- ==============================================================  <!-- ==============================================================
1498    Running guava tests against jsr166 code    Running guava tests against jsr166 code
# Line 1654  Line 1546 
1546      <get src="http://repo2.maven.org/maven2/com/google/guava/guava-testlib/${guava.version}/guava-testlib-${guava.version}-tests.jar"      <get src="http://repo2.maven.org/maven2/com/google/guava/guava-testlib/${guava.version}/guava-testlib-${guava.version}-tests.jar"
1547           dest="${guava.dir}/guava-testlib-tests.jar" usetimestamp="true"/>           dest="${guava.dir}/guava-testlib-tests.jar" usetimestamp="true"/>
1548      <junit printsummary="true" showoutput="true" haltonfailure="true"      <junit printsummary="true" showoutput="true" haltonfailure="true"
1549             jvm="${java9}" fork="true">             jvm="${build.main.java}" fork="true">
1550        <jvmarg line="-ea -esa --patch-module java.base=${product.jar}"/>        <jvmarg line="-ea -esa --patch-module=java.base=${product.jar}"/>
1551        <formatter type="brief"/>        <formatter type="brief"/>
1552        <classpath>        <classpath>
1553          <pathelement location="${guava.dir}/guava-testlib-tests.jar"/>          <pathelement location="${guava.dir}/guava-testlib-tests.jar"/>

Legend:
Removed from v.1.236  
changed lines
  Added in v.1.272

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