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

Diff of /jsr166/build.xml

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

revision 1.213 by jsr166, Sat Jun 4 23:49:29 2016 UTC revision 1.294 by jsr166, Mon Dec 31 07:05:54 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      $HOME/jdk/jdk12
27      $HOME/jdk/jdk13
28    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  
29    $HOME/jdk/src/jdk8    $HOME/jdk/src/jdk8
30    $HOME/jdk/src/jdk9    $HOME/jdk/src/jdk9
31      $HOME/jdk/src/jdk10
32      $HOME/jdk/src/jdk11
33      $HOME/jdk/src/jdk12
34      $HOME/jdk/src/jdk13
35    where each of the above is a complete JDK source tree    where each of the above is a complete JDK source tree
36    (e.g. mercurial forest) or a symlink to same.    (e.g. mercurial forest) or a symlink to same.
37    
38    Alternatively, define ant variables thus:    Alternatively, define ant variables thus:
39    ant -Djdk$N.home=... -Djdk$N.src.home=...    ant -Djdk$N.home=... -Djdk$N.src.home=...
40    for $N in 6 7 8 9 ...    for $N in 8 .. 13 ...
41    
42    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.  
43  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
44    </description>    </description>
45    
# Line 52  Line 57 
57    
58    
59    <!-- Compilation options -->    <!-- Compilation options -->
   <property name="build.sourcelevel"    value="6"/>  
60    <property name="build.debug"          value="true"/>    <property name="build.debug"          value="true"/>
61    <property name="build.debuglevel"     value="source,lines,vars"/>    <property name="build.debuglevel"     value="source,lines,vars"/>
62    <property name="build.deprecation"    value="false"/>    <property name="build.deprecation"    value="false"/>
# Line 63  Line 67 
67    <property name="build.classes.dir"           location="${build.dir}/classes"/>    <property name="build.classes.dir"           location="${build.dir}/classes"/>
68    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>
69    <property name="build.loops.dir"             location="${build.dir}/loops"/>    <property name="build.loops.dir"             location="${build.dir}/loops"/>
   <property name="build.reports.dir"           location="${build.dir}/reports"/>  
70    
71    <property name="build.4jdk7.dir"             location="${build.dir}/jsr166-4jdk7"/>    <property name="build.4jdk7.dir"             location="${build.dir}/jsr166-4jdk7"/>
72    <property name="build.4jdk7.classes.dir"     location="${build.4jdk7.dir}/classes"/>    <property name="build.4jdk7.classes.dir"     location="${build.4jdk7.dir}/classes"/>
# Line 104  Line 107 
107      <property name="jdk@{v}.src.dir" location="${jdk@{v}.src.home}/jdk/src/share/classes"      <property name="jdk@{v}.src.dir" location="${jdk@{v}.src.home}/jdk/src/share/classes"
108        unless:set="have.java.base"/>        unless:set="have.java.base"/>
109      <local name="modules"/>      <local name="modules"/>
110      <available property="modules" file="${jdk@{v}.home}/jmods" type="dir"/>      <available property="modules" file="${jdk@{v}.home}/lib/modules" type="file"/>
111      <local name="boot.jar.dir"/>      <local name="boot.jar.dir"/>
112      <property name="boot.jar.dir"   location="${jdk@{v}.home}/jre/lib" unless:set="modules"/>      <property name="boot.jar.dir"   location="${jdk@{v}.home}/jre/lib" unless:set="modules"/>
113      <path id="bootclasspath@{v}" unless:set="modules">      <path id="bootclasspath@{v}" unless:set="modules">
# Line 134  Line 137 
137    <defjdklocations v="7"/>    <defjdklocations v="7"/>
138    <defjdklocations v="8"/>    <defjdklocations v="8"/>
139    <defjdklocations v="9"/>    <defjdklocations v="9"/>
140      <defjdklocations v="10"/>
141      <defjdklocations v="11"/>
142      <defjdklocations v="12"/>
143      <defjdklocations v="13"/>
144    
145    <!-- Source locations -->    <!-- Source locations -->
146    <property name="src.dir"              location="${basedir}/src/main"/>    <property name="src.dir"              location="${basedir}/src/main"/>
# Line 143  Line 150 
150    <property name="jtreg7.src.dir"       location="${test.src.dir}/jtreg-jdk7"/>    <property name="jtreg7.src.dir"       location="${test.src.dir}/jtreg-jdk7"/>
151    <property name="jtreg8.src.dir"       location="${test.src.dir}/jtreg-jdk8"/>    <property name="jtreg8.src.dir"       location="${test.src.dir}/jtreg-jdk8"/>
152    <property name="jtreg9.src.dir"       location="${test.src.dir}/jtreg"/>    <property name="jtreg9.src.dir"       location="${test.src.dir}/jtreg"/>
153      <property name="jtreg10.src.dir"      location="${test.src.dir}/jtreg"/>
154      <property name="jtreg11.src.dir"      location="${test.src.dir}/jtreg"/>
155      <property name="jtreg12.src.dir"      location="${test.src.dir}/jtreg"/>
156      <property name="jtreg13.src.dir"      location="${test.src.dir}/jtreg"/>
157    <property name="jtreg.src.dir"        location="${jtreg9.src.dir}"/>    <property name="jtreg.src.dir"        location="${jtreg9.src.dir}"/>
158    <property name="lib.dir"              location="${basedir}/lib"/>    <property name="lib.dir"              location="${basedir}/lib"/>
159    <property name="dist.dir"             location="${basedir}/dist"/>    <property name="dist.dir"             location="${basedir}/dist"/>
# Line 182  Line 193 
193    <property name="junit.jar"        location="${lib.dir}/junit.jar"/>    <property name="junit.jar"        location="${lib.dir}/junit.jar"/>
194    
195    <!-- Canonical location of jdk docs root, to use with javadoc -Xdocrootparent flag -->    <!-- Canonical location of jdk docs root, to use with javadoc -Xdocrootparent flag -->
196    <property name="java5.docroot.url"      value="http://docs.oracle.com/javase/1.5.0/docs"/>    <!-- Switched to https: in 2017-10 - JDK-8190312 -->
197    <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"/>
198    <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"/>
199    <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"/>
200    <!-- 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"/>
201    <!-- <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"/>
202    <property name="java9.docroot.url"      value="http://http://download.java.net/java/jdk9/docs"/>    <property name="java10.docroot.url" value="https://docs.oracle.com/javase/10/docs"/>
203    <!-- Default jdk doc location (latest stable release seems best) -->    <property name="java11.docroot.url" value="https://docs.oracle.com/en/java/javase/11/docs"/>
204    <property name="java.docroot.url"       value="${java8.docroot.url}"/>    <!-- The location of jdk early access docs (RIP) -->
205      <!-- <property name="java9.docroot.url" value="http://download.java.net/java/jdk9/docs"/> -->
206      <!-- <property name="java10.docroot.url" value="http://download.java.net/java/jdk10/docs"/> -->
207      <!-- <property name="java11.docroot.url" value="http://download.java.net/java/jdk11/docs"/> -->
208      <property name="java12.docroot.url" value="https://download.java.net/java/jdk12/docs"/>
209      <property name="java13.docroot.url" value="https://download.java.net/java/early_access/jdk13/docs"/>
210      <!-- Default jdk doc location (latest stable LTS release seems best) -->
211      <property name="java.docroot.url"   value="${java11.docroot.url}"/>
212    
213    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
214    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>
# Line 198  Line 216 
216    <property name="java7.api.url"      value="${java7.docroot.url}/api/"/>    <property name="java7.api.url"      value="${java7.docroot.url}/api/"/>
217    <property name="java8.api.url"      value="${java8.docroot.url}/api/"/>    <property name="java8.api.url"      value="${java8.docroot.url}/api/"/>
218    <property name="java9.api.url"      value="${java9.docroot.url}/api/"/>    <property name="java9.api.url"      value="${java9.docroot.url}/api/"/>
219      <property name="java10.api.url"     value="${java10.docroot.url}/api/"/>
220      <property name="java11.api.url"     value="${java11.docroot.url}/api/"/>
221      <property name="java12.api.url"     value="${java12.docroot.url}/api/"/>
222      <property name="java13.api.url"     value="${java13.docroot.url}/api/"/>
223    <property name="java.api.url"       value="${java.docroot.url}/api/"/>    <property name="java.api.url"       value="${java.docroot.url}/api/"/>
224    
225    <!-- Define the "jtreg" task -->    <!-- Define the "jtreg" task -->
# Line 230  Line 252 
252    
253      <local name="modules"/>      <local name="modules"/>
254      <condition property="modules">      <condition property="modules">
255        <available file="${jdk@{compile-target}.home}/jmods" type="dir"/>        <available file="${jdk@{compile-target}.home}/lib/modules" type="file"/>
256        </condition>
257    
258        <local name="use-doclint"/>
259        <condition property="use-doclint">
260          <not> <equals arg1="@{target}" arg2="7"/> </not>
261      </condition>      </condition>
262    
263      <mkdir dir="@{workdir}/tck-classes"/>      <mkdir dir="@{workdir}/tck-classes"/>
# Line 245  Line 272 
272             classpath="${junit.jar}"             classpath="${junit.jar}"
273             includeAntRuntime="false"             includeAntRuntime="false"
274             includeJavaRuntime="false"             includeJavaRuntime="false"
275               encoding="ASCII"
276             executable="${javac@{compile-target}}"             executable="${javac@{compile-target}}"
277             fork="true">             fork="true">
278    
279        <include name="*.java"/>        <include name="*.java"/>
280        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
281        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>
282          <compilerarg value="-Xdoclint:reference/private" if:set="use-doclint"/>
283        <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>        <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
284        <compilerarg value="-Xpatch:java.base=${build.classes.dir}/java.base" if:set="modules"/>        <compilerarg value="--patch-module=java.base=@{classes}" if:set="modules"/>
285        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
286        <javac-elements/>        <javac-elements/>
287    
# Line 263  Line 292 
292            jvm="${java@{target}}"            jvm="${java@{target}}"
293            fork="true">            fork="true">
294          <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>          <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
295          <jvmarg value="-Xpatch:java.base=${build.classes.dir}/java.base" if:set="modules"/>          <jvmarg value="--patch-module=java.base=@{classes}" if:set="modules"/>
296            <jvmarg value="--add-opens=java.base/java.lang=ALL-UNNAMED" if:set="modules"/>
297            <jvmarg value="--add-opens=java.base/java.util=ALL-UNNAMED" if:set="modules"/>
298            <jvmarg value="--add-opens=java.base/java.util.concurrent=ALL-UNNAMED" if:set="modules"/>
299            <jvmarg value="--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED" if:set="modules"/>
300            <jvmarg value="--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED" if:set="modules"/>
301          <jvmarg line="@{jvmflags}"/>          <jvmarg line="@{jvmflags}"/>
302            <!-- ant -Dvmoptions="-Xmx8m" -Djsr166.tckTestClass=CompletableFutureTest tck -->
303            <jvmarg line="${vmoptions}" if:set="vmoptions"/>
304    
305          <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->          <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
306          <syspropertyset id="system-properties-used-by-tck">          <syspropertyset id="system-properties-used-by-tck">
307            <propertyref prefix="java.util.concurrent.ForkJoinPool"/>            <propertyref prefix="java.util.concurrent.ForkJoinPool"/>
308            <propertyref prefix="jsr166."/>            <propertyref prefix="jsr166."/>
# Line 283  Line 319 
319    </macrodef>    </macrodef>
320    
321    <!-- Define jtreg test sets for different jdk versions -->    <!-- Define jtreg test sets for different jdk versions -->
322    <fileset dir="${jtreg9.src.dir}">    <!-- ant -Djtreg.test.pattern="**/ConcurrentHashMap/" -->
323      <patternset id="jdk9.jtreg.tests">    <!-- ant -Djtreg.test.pattern="**/ToArray.java" -->
324        <include name="**/*.java"/>    <property name="jtreg.test.pattern" value="**/*.java"/>
325      </patternset>    <macrodef name="defjtregtests">
326    </fileset>      <attribute name="v"/>
327        <sequential>
328    <fileset dir="${jtreg8.src.dir}">        <fileset dir="${jtreg@{v}.src.dir}">
329      <patternset id="jdk8.jtreg.tests">          <patternset id="jdk@{v}.jtreg.tests">
330        <include name="**/*.java"/>            <include name="${jtreg.test.pattern}"/>
331        <exclude name="**/SpliteratorCharacteristics.java"/>          </patternset>
332        <!-- https://bugs.openjdk.java.net/browse/JDK-6842353 -->        </fileset>
333        <exclude name="**/GCDuringIteration.java"/>      </sequential>
334      </patternset>    </macrodef>
   </fileset>  
335    
336    <fileset dir="${jtreg7.src.dir}">    <defjtregtests v="13"/>
337      <patternset id="jdk7.jtreg.tests">    <defjtregtests v="12"/>
338        <include name="**/*.java"/>    <defjtregtests v="11"/>
339      </patternset>    <defjtregtests v="10"/>
340    </fileset>    <defjtregtests v="9"/>
341      <defjtregtests v="8"/>
342      <defjtregtests v="7"/>
343    
344    <!-- ant -Djtreg.flags=-timeoutFactor:4 -->    <!-- ant -Djtreg.flags=-timeoutFactor:4 -->
345    <property name="jtreg.flags" value=""/>    <property name="jtreg.flags" value=""/>
346    
347    <macrodef name="run-jtreg-tests">    <macrodef name="run-jtreg-tests">
348      <!-- ant -Djtreg9.src.dir=src/test/jtreg/util/concurrent/CompletableFuture jtreg -->      <!-- ant -Djtreg11.src.dir=src/test/jtreg/util/concurrent/CompletableFuture jtreg -->
     <attribute name="source" default="7"/>  
349      <attribute name="target"/>      <attribute name="target"/>
350      <attribute name="workdir"/>      <attribute name="workdir"/>
351      <attribute name="classes"/>      <attribute name="classes"/>
352        <attribute name="verbose" default="${jtreg.verbose}"/>
353      <attribute name="jtregflags" default=""/>      <attribute name="jtregflags" default=""/>
354        <element name="jtreg-elements" optional="true"/>
355    
356      <sequential>      <sequential>
357    
# Line 322  Line 360 
360    
361      <local name="modules"/>      <local name="modules"/>
362      <condition property="modules">      <condition property="modules">
363        <available file="${jdk@{target}.home}/jmods" type="dir"/>        <available file="${jdk@{target}.home}/lib/modules" type="file"/>
364      </condition>      </condition>
365    
366      <delete dir="@{workdir}/JTwork"   quiet="true"/>      <delete dir="@{workdir}/JTwork"   quiet="true"/>
     <delete dir="@{workdir}/JTreport" quiet="true"/>  
367      <jtreg dir="${jtreg@{target}.src.dir}"      <jtreg dir="${jtreg@{target}.src.dir}"
368             jdk="${jdk@{target}.home}"             jdk="${jdk@{target}.home}"
369             workDir="@{workdir}/JTwork"             workDir="@{workdir}/JTwork">
            reportDir="@{workdir}/JTreport">  
370        <patternset refid="jdk@{target}.jtreg.tests"/>        <patternset refid="jdk@{target}.jtreg.tests"/>
371        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>        <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
372        <arg value="-vmoption:-Xpatch:java.base=${build.classes.dir}/java.base" if:set="modules"/>        <arg value="-javacoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
373          <arg value="-vmoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
374        <arg value="-agentvm"/>        <arg value="-agentvm"/>
375        <arg value="-verbose:${jtreg.verbose}"/>        <arg value="-noreport"/>
376          <arg value="-verbose:@{verbose}"/>
377        <arg value="-vmoptions:-esa -ea"/>        <arg value="-vmoptions:-esa -ea"/>
378        <arg value="-automatic"/>        <arg value="-automatic"/>
379        <arg value="-k:!ignore"/>        <arg value="-k:!ignore"/>
380        <arg line="@{jtregflags}"/>        <arg line="@{jtregflags}"/>
381        <arg line="${jtreg.flags}"/>        <arg line="${jtreg.flags}"/>
382          <jtreg-elements/>
383      </jtreg>      </jtreg>
384      </sequential>      </sequential>
385    </macrodef>    </macrodef>
# Line 356  Line 395 
395    
396    <!-- Main targets -->    <!-- Main targets -->
397    
398    <property name="build.main.java.version" value="9"/>    <!-- Default values: may seem strange ... -->
399      <!-- At runtime, target latest LTS, i.e. jdk11 -->
400      <!-- But at build time, target jdk9, for maximal binary portability -->
401      <!-- Use javadoc12 (but -link to jdk11 api docs!), to get:
402        o override-methods=summary
403        o {@systemProperty ...}
404        o 8211194: issues linking to external documentation (was: missing package-list for JDK10 / JDK11 documentation)
405        o 8202628: javadoc generates bad links in TestModules.java
406        -->
407      <property name="java.runtime.target" value="11"/>
408      <property name="build.main.java" value="${java11}"/>
409    <property name="build.main.javac" value="${javac9}"/>    <property name="build.main.javac" value="${javac9}"/>
410      <property name="build.main.javadoc" value="${javadoc12}"/>
411      <property name="build.main.javadoc.source" value="${java.runtime.target}"/>
412    
413    <target name="dists"    <target name="dists"
414            depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"            depends="dist, 4jdk8dist"
415            description="Builds all public jars and docs"/>            description="Builds all public jars and docs"/>
416              <!-- no longer supported: 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist -->
417    
418    <target name="compile"    <target name="compile"
419            depends="configure-compiler"            depends="configure-compiler"
420            description="Compiles src/main sources to build dir">            description="Compiles src/main sources to build dir">
421    
     <local name="modules"/>  
     <condition property="modules">  
       <and>  
         <available file="${jdk9.home}/jmods" type="dir"/>  
         <equals arg1="9" arg2="${build.main.java.version}"/>  
       </and>  
     </condition>  
   
422      <local name="destdir"/>      <local name="destdir"/>
423      <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"/>  
424    
425      <mkdir dir="${destdir}"/>      <mkdir dir="${destdir}"/>
426    
# Line 389  Line 432 
432             classpath=""             classpath=""
433             includeAntRuntime="false"             includeAntRuntime="false"
434             includeJavaRuntime="false"             includeJavaRuntime="false"
435               encoding="ASCII"
436             executable="${build.main.javac}"             executable="${build.main.javac}"
437             fork="true">             fork="true">
438    
439        <include name="**/*.java"/>        <include name="**/*.java"/>
440        <compilerarg value="-Xmodule:java.base" if:set="modules"/>        <compilerarg value="--patch-module=java.base=${src.dir}"/>
441        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
442        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
443        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all,-removal"/>
444          <compilerarg line="--doclint-format html5"/>
445          <compilerarg value="-Xdoclint:all/protected,reference/private"/>
446        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
       <compilerarg value="-Xdoclint:all/protected"/>  
447        <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>        <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
448        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
449    
# Line 430  Line 475 
475      <!-- the packagenames="none" hack below prevents scanning the -->      <!-- the packagenames="none" hack below prevents scanning the -->
476      <!-- sourcepath for packages -->      <!-- sourcepath for packages -->
477    
478    <!-- TODO: sourcepath="${src.dir}:${jdk9.src.dir}" -->
479    <!-- TODO: sourcepath="${src.dir}:${jdk9.src.dir}:${jdk9.src.home}/jdk/src/java.logging/share/classes" -->
480    <!-- TODO: sourcepath="${src.dir}:${jdk9.home}/src.zip" -->
481    <!-- TODO: <arg line="-sourcepath ${src.dir}:${jdk9.home}/src.zip"/> -->
482    <!-- TODO: <arg line="- -module-source-path ${jdk9.home}/src.zip"/> -->
483      <javadoc destdir="${docs.dir}"      <javadoc destdir="${docs.dir}"
484               packagenames="none"               packagenames="none"
485               link="${java9.api.url}"               link="${java.api.url}"
486               overview="${src.dir}/intro.html"               overview="${src.dir}/intro.html"
487               access="${build.javadoc.access}"               access="${build.javadoc.access}"
488               sourcepath="${src.dir}:${jdk9.src.dir}"               sourcepath="${src.dir}"
489               classpath=""               classpath=""
490               executable="${javadoc9}">               source="${build.main.javadoc.source}"
491                 executable="${build.main.javadoc}">
492    <!-- TODO: JDK-8214571 failonerror = "true" -->
493        <fileset dir="${src.dir}" defaultexcludes="yes">        <fileset dir="${src.dir}" defaultexcludes="yes">
494          <include name="**/*.java"/>          <include name="**/*.java"/>
495        </fileset>        </fileset>
496        <arg line="-Xdocrootparent ${java9.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
497        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>        <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
498        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
499  <!--  TODO     <arg value="-Xmodule:java.base"/> -->        <arg value="-html5"/>
500        <arg value="-tag"/>        <arg value="--patch-module=java.base=${src.dir}"/>
501        <arg value="${javadoc.jls.option}"/>  <!-- old school frames via docs/index.html?overview-summary.html -->
502        <arg value="-tag"/>        <arg value="--frames"/>
503        <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>        <arg value="--override-methods=summary"/>
504        <arg value="-tag"/>        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>
505        <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>        <arg value="-tag"/> <arg value="implSpec:a:Implementation Requirements:"/>
506        <arg value="-tag"/>        <arg value="-tag"/> <arg value="implNote:a:Implementation Note:"/>
507        <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>        <arg value="-tag"/> <arg value="apiNote:a:API Note:"/>
508  <!-- tags added in jdk9 -->  <!-- tags added in jdk9: currently unused -->
509        <arg value="-tag"/>  <!--  <arg value="-tag"/> <arg value="revised:X"/> -->
510        <arg value="revised:X"/>  <!--  <arg value="-tag"/> <arg value="spec:X"/> -->
       <arg value="-tag"/>  
       <arg value="spec:X"/>  
511      </javadoc>      </javadoc>
512    </target>    </target>
513    
# Line 467  Line 517 
517            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
518    
519    
   <target name="release"  
           depends="dist"  
           description="Puts entire CVS tree, plus distribution productions, in a jar">  
   
     <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>  
   
     <jar basedir="${basedir}" destfile="${release.jar}">  
       <!-- <exclude name="build/**"/> -->  
       <exclude name="${release.jar}"/>  
       <exclude name="user.properties"/>  
       <exclude name="etc/notes/**"/>  
       <exclude name="src/emulation/**"/>  
       <exclude name="**/SyntaxTest.java"/>  
       <exclude name="**/SuperfluousAbstract.java"/>  
       <manifest>  
         <attribute name="Built-By" value="${user.name}"/>  
         <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>  
       </manifest>  
     </jar>  
   </target>  
   
   
520    <target name="clean"    <target name="clean"
521            description="Removes all build products">            description="Removes all build products">
   
522      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
   
523    </target>    </target>
524    
525    
526    <target name="dist-clean"    <target name="dist-clean"
527            description="Removes all build and distribution products">            description="Removes all build and distribution products">
   
528      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
529      <delete dir="${dist.dir}"/>      <delete dir="${dist.dir}"/>
   
530    </target>    </target>
531    
532    
# Line 521  Line 545 
545            description="Runs tck tests for src/main directly">            description="Runs tck tests for src/main directly">
546    
547      <run-tck-tests      <run-tck-tests
548        target="${build.main.java.version}"        target="${java.runtime.target}"
549        workdir="${build.dir}"        workdir="${build.dir}"
550        classes="${product.jar}"/>        classes="${product.jar}">
551          <javac-elements>
552            <compilerarg value="-Werror"/>
553          </javac-elements>
554        </run-tck-tests>
555    </target>    </target>
556    
557    <target name="tck-parallelism-1"    <target name="tck-parallelism-1"
# Line 551  Line 579 
579            depends="jar"            depends="jar"
580            description="Runs jtreg tests for src/main using the jtreg ant task">            description="Runs jtreg tests for src/main using the jtreg ant task">
581      <run-jtreg-tests      <run-jtreg-tests
582         target="${build.main.java.version}"         target="${java.runtime.target}"
583         workdir="${build.dir}"         workdir="${build.dir}"
584         classes="${product.jar}"/>         classes="${product.jar}"/>
585    </target>    </target>
586    
587    <target name="test"    <target name="test"
588            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"
589            description="Runs tck and jtreg tests for src/main">            description="Runs tck and jtreg tests for src/main"/>
590    
591      <target name="test-version-permutations"
592              depends="test9, test10, test11, test12, test13, test9-11, test9-12, test9-13, clean, test, docs">
593    </target>    </target>
594    
595  <!--   <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->    <target name="test9">
596        <antcall target="clean"/>
597        <antcall>
598          <param name="java.runtime.target" value="9"/>
599          <param name="build.main.javac" value="${javac9}"/>
600          <param name="build.main.javadoc" value="${javadoc12}"/>
601          <param name="build.main.javadoc.source" value="9"/>
602          <target name="test"/>
603          <target name="docs"/>
604        </antcall>
605      </target>
606    
607  <!--     <antcall target="jtreg"> -->    <target name="test10">
608  <!--       <param name="build.main.java.version" value="8"/> -->      <antcall target="clean"/>
609  <!--       <param name="build.main.javac" value="${javac8}"/> -->      <antcall>
610  <!--     </antcall> -->        <param name="java.runtime.target" value="10"/>
611          <param name="build.main.javac" value="${javac10}"/>
612          <param name="build.main.javadoc" value="${javadoc12}"/>
613          <param name="build.main.javadoc.source" value="10"/>
614          <target name="test"/>
615          <target name="docs"/>
616        </antcall>
617      </target>
618    
619  <!--   </target> -->    <target name="test11">
620        <antcall target="clean"/>
621        <antcall>
622          <param name="java.runtime.target" value="11"/>
623          <param name="build.main.javac" value="${javac11}"/>
624          <param name="build.main.javadoc" value="${javadoc12}"/>
625          <param name="build.main.javadoc.source" value="11"/>
626          <target name="test"/>
627          <target name="docs"/>
628        </antcall>
629      </target>
630    
631  <!--   <target name="test89" -->    <target name="test12">
632  <!--           description="Runs tck and jtreg tests for src/main for multiple java versions"> -->      <antcall target="clean"/>
633        <antcall>
634          <param name="java.runtime.target" value="12"/>
635          <param name="build.main.javac" value="${javac12}"/>
636          <param name="build.main.javadoc" value="${javadoc12}"/>
637          <param name="build.main.javadoc.source" value="12"/>
638          <target name="test"/>
639          <target name="docs"/>
640        </antcall>
641      </target>
642    
643  <!--     <antcall target="clean"/> -->    <target name="test13">
644  <!--     <antcall target="test"> -->      <antcall target="clean"/>
645  <!--       <param name="build.main.java.version" value="8"/> -->      <antcall>
646  <!--       <param name="build.main.javac" value="${javac8}"/> -->        <param name="java.runtime.target" value="13"/>
647  <!--     </antcall> -->        <param name="build.main.javac" value="${javac13}"/>
648          <param name="build.main.javadoc" value="${javadoc13}"/>
649          <param name="build.main.javadoc.source" value="13"/>
650          <target name="test"/>
651          <target name="docs"/>
652        </antcall>
653      </target>
654    
655  <!--     <antcall target="clean"/> -->    <target name="test9-11">
656  <!--     <antcall target="test"> -->      <antcall target="clean"/>
657  <!--       <param name="build.main.java.version" value="9"/> -->      <antcall>
658  <!--       <param name="build.main.javac" value="${javac9}"/> -->        <param name="java.runtime.target" value="11"/>
659  <!--     </antcall> -->        <param name="build.main.javac" value="${javac9}"/>
660          <param name="build.main.javadoc" value="${javadoc12}"/>
661          <param name="build.main.javadoc.source" value="9"/>
662          <target name="test"/>
663          <target name="docs"/>
664        </antcall>
665      </target>
666    
667  <!--   </target> -->    <target name="test9-12">
668        <antcall target="clean"/>
669        <antcall>
670          <param name="java.runtime.target" value="12"/>
671          <param name="build.main.javac" value="${javac9}"/>
672          <param name="build.main.javadoc" value="${javadoc12}"/>
673          <param name="build.main.javadoc.source" value="9"/>
674          <target name="test"/>
675          <target name="docs"/>
676        </antcall>
677      </target>
678    
679      <target name="test9-13">
680        <antcall target="clean"/>
681        <antcall>
682          <param name="java.runtime.target" value="13"/>
683          <param name="build.main.javac" value="${javac9}"/>
684          <param name="build.main.javadoc" value="${javadoc13}"/>
685          <param name="build.main.javadoc.source" value="9"/>
686          <target name="test"/>
687          <target name="docs"/>
688        </antcall>
689      </target>
690    
691    
692    <target name="configure-compiler">    <target name="configure-compiler">
693      <fail message="ant version too old">      <fail message="ant version too old">
694        <condition>        <condition> <not> <antversion atleast="1.9.1"/> </not> </condition>
         <not> <antversion atleast="1.9.1"/> </not>  
       </condition>  
695      </fail>      </fail>
696    
697      <property name="unchecked.option" value="-Xlint:unchecked"/>      <property name="unchecked.option" value="-Xlint:unchecked"/>
# Line 611  Line 709 
709    </target>    </target>
710    
711    
   
   <!-- Various demos and test programs -->  
   
   
   <!-- description="Benchmark from Doug Lea's AQS paper" -->  
   <target name="loops" depends="configure-compiler">  
   
     <mkdir dir="${build.loops.dir}"/>  
   
     <javac srcdir="${loops.src.dir}"  
           destdir="${build.loops.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${build.sourcelevel}"  
            target="${build.sourcelevel}"  
              fork="true">  
   
       <compilerarg line="${build.args}"/>  
       <classpath refid="loops.classpath"/>  
       <compilerarg value="-XDignore.symbol.file=true"/>  
   
     </javac>  
   
     <java classname="ALoops" fork="true">  
       <classpath refid="loops.classpath"/>  
     </java>  
   
   </target>  
   
   
712    <target name="compile-test-loops" depends="jar"    <target name="compile-test-loops" depends="jar"
713            description="compile all the perf tests in src/test/loops">            description="Compiles all the perf tests in src/test/loops">
714    
715      <mkdir dir="${build.dir}/test/loops"/>      <mkdir dir="${build.dir}/test/loops"/>
716    
# Line 654  Line 721 
721             deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
722             includeAntRuntime="false"             includeAntRuntime="false"
723             includeJavaRuntime="false"             includeJavaRuntime="false"
724             executable="${javac9}"             encoding="ASCII"
725               executable="${build.main.javac}"
726             fork="true">             fork="true">
727    
728        <include name="*.java"/>        <include name="*.java"/>
# Line 662  Line 730 
730        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
731        <compilerarg value="-Xbootclasspath/p:${product.jar}"/>        <compilerarg value="-Xbootclasspath/p:${product.jar}"/>
732        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
733      </javac>      </javac>
   
734    </target>    </target>
735    
736    
# Line 687  Line 753 
753             bootclasspath="${bootclasspath8}"             bootclasspath="${bootclasspath8}"
754             includeAntRuntime="false"             includeAntRuntime="false"
755             includeJavaRuntime="false"             includeJavaRuntime="false"
756               encoding="ASCII"
757             executable="${javac8}"             executable="${javac8}"
758             fork="true">             fork="true">
   
759        <include name="**/*.java"/>        <include name="**/*.java"/>
760        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
761        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
762        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
763        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
764        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
765      </javac>      </javac>
766    </target>    </target>
767    
# Line 717  Line 782 
782             bootclasspath="${bootclasspath8}"             bootclasspath="${bootclasspath8}"
783             includeAntRuntime="false"             includeAntRuntime="false"
784             includeJavaRuntime="false"             includeJavaRuntime="false"
785               encoding="ASCII"
786             executable="${javac8}"             executable="${javac8}"
787             fork="true">             fork="true">
   
788        <include name="**/*.java"/>        <include name="**/*.java"/>
789        <compilerarg value="-Xprefer:source"/>        <compilerarg value="-Xprefer:source"/>
790        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
791        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
792        <compilerarg value="-Xdoclint:all/protected"/>        <compilerarg value="-Xdoclint:all/protected,reference/private"/>
793        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
794      </javac>      </javac>
795    </target>    </target>
796    
# Line 742  Line 806 
806          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
807        </manifest>        </manifest>
808      </jar>      </jar>
   
809    </target>    </target>
810    
811    
# Line 758  Line 821 
821          <!-- JDK9+ test classes -->          <!-- JDK9+ test classes -->
822          <exclude name="*9Test.java"/>          <exclude name="*9Test.java"/>
823          <exclude name="*10Test.java"/>          <exclude name="*10Test.java"/>
824            <compilerarg value="-Werror"/>
825        </javac-elements>        </javac-elements>
826      </run-tck-tests>      </run-tck-tests>
827    </target>    </target>
# Line 775  Line 839 
839    
840    <target name="4jdk8-test"    <target name="4jdk8-test"
841            depends="4jdk8-tck, 4jdk8-jtreg"            depends="4jdk8-tck, 4jdk8-jtreg"
842            description="Runs tck and jtreg tests for jsr166-4jdk8">            description="Runs tck and jtreg tests for jsr166-4jdk8"/>
   </target>  
843    
844    
845    <target name="4jdk8docs"    <target name="4jdk8docs"
# Line 792  Line 855 
855               access="${build.javadoc.access}"               access="${build.javadoc.access}"
856               sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"               sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"
857               classpath=""               classpath=""
858                 source="8"
859               executable="${javadoc8}"               executable="${javadoc8}"
860               failonerror = "true">               failonerror = "true">
861        <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">        <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">
# Line 799  Line 863 
863        </fileset>        </fileset>
864        <arg line="-Xdocrootparent ${java8.docroot.url}"/>        <arg line="-Xdocrootparent ${java8.docroot.url}"/>
865        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
866        <arg value="-tag"/>        <arg value="-tag"/> <arg value="${javadoc.jls.option}"/>
867        <arg value="${javadoc.jls.option}"/>        <arg value="-tag"/> <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
868        <arg value="-tag"/>        <arg value="-tag"/> <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
869        <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>  <!-- @apiNote tag currently unused -->
870        <arg value="-tag"/>  <!--  <arg value="-tag"/> <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/> -->
       <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;"/>  
871      </javadoc>      </javadoc>
872    </target>    </target>
873    
# Line 818  Line 879 
879    
880    <target name="4jdk8clean"    <target name="4jdk8clean"
881            description="Removes all 4jdk8 build products">            description="Removes all 4jdk8 build products">
   
882      <delete dir="${build.4jdk8.dir}"/>      <delete dir="${build.4jdk8.dir}"/>
   
883    </target>    </target>
884    
885    
# Line 836  Line 895 
895    </target>    </target>
896    
897    
898      <!-- jsr166 4jdk7 (no longer maintained) -->
899    
900    <!-- jsr166 4jdk7 -->    <target name="4jdk7compile" depends="configure-compiler">
   
   <target name="4jdk7compile"  
           depends="configure-compiler"  
           description="Compiles src/jdk7 sources, targeting jdk7">  
   
901      <mkdir dir="${build.4jdk7.classes.dir}"/>      <mkdir dir="${build.4jdk7.classes.dir}"/>
902    
903      <javac srcdir="${4jdk7src.dir}"      <javac srcdir="${4jdk7src.dir}"
# Line 856  Line 911 
911             bootclasspath="${bootclasspath6}"             bootclasspath="${bootclasspath6}"
912             includeAntRuntime="false"             includeAntRuntime="false"
913             includeJavaRuntime="false"             includeJavaRuntime="false"
914               encoding="ASCII"
915             executable="${javac7}"             executable="${javac7}"
916             fork="true">             fork="true">
917    
# Line 865  Line 921 
921        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
922        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
923        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
924      </javac>      </javac>
925    </target>    </target>
926    
927    <target name="4jdk7doclint"    <target name="4jdk7doclint" depends="configure-compiler">
           depends="configure-compiler"  
           description="Finds doclint warnings">  
   
928      <mkdir dir="${build.4jdk7.classes.dir}"/>      <mkdir dir="${build.4jdk7.classes.dir}"/>
929    
930      <javac srcdir="${4jdk7src.dir}"      <javac srcdir="${4jdk7src.dir}"
# Line 886  Line 938 
938             bootclasspath="${bootclasspath6}"             bootclasspath="${bootclasspath6}"
939             includeAntRuntime="false"             includeAntRuntime="false"
940             includeJavaRuntime="false"             includeJavaRuntime="false"
941               encoding="ASCII"
942             executable="${javac8}"             executable="${javac8}"
943             fork="true">             fork="true">
944    
# Line 895  Line 948 
948        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
949        <compilerarg value="-Xdoclint:all/protected"/>        <compilerarg value="-Xdoclint:all/protected"/>
950        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
951      </javac>      </javac>
952    </target>    </target>
953    
954      <target name="4jdk7jar" depends="4jdk7compile">
   <target name="4jdk7jar"  
           depends="4jdk7compile"  
           description="Builds library jar from compiled sources">  
   
955      <jar destfile="${4jdk7product.jar}">      <jar destfile="${4jdk7product.jar}">
956        <fileset dir="${build.4jdk7.classes.dir}"/>        <fileset dir="${build.4jdk7.classes.dir}"/>
957        <manifest>        <manifest>
# Line 911  Line 959 
959          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
960        </manifest>        </manifest>
961      </jar>      </jar>
   
962    </target>    </target>
963    
964      <target name="4jdk7-tck" depends="4jdk7jar">
   <target name="4jdk7-tck"  
           depends="4jdk7jar"  
           description="Runs tck tests for jsr166-4jdk7 directly">  
   
965      <run-tck-tests      <run-tck-tests
966        target="7"        target="7"
967        workdir="${build.4jdk7.dir}"        workdir="${build.4jdk7.dir}"
# Line 936  Line 979 
979          <exclude name="SplittableRandomTest.java"/>          <exclude name="SplittableRandomTest.java"/>
980          <exclude name="StampedLockTest.java"/>          <exclude name="StampedLockTest.java"/>
981          <exclude name="SubmissionPublisherTest.java"/>          <exclude name="SubmissionPublisherTest.java"/>
982            <compilerarg value="-Werror"/>
983        </javac-elements>        </javac-elements>
984      </run-tck-tests>      </run-tck-tests>
985    </target>    </target>
986    
   
987    <!-- Runs tck tests for jsr166-4jdk7 via junit task (dead experiment) -->    <!-- Runs tck tests for jsr166-4jdk7 via junit task (dead experiment) -->
988    <target name="4jdk7-tck-junit"    <target name="4jdk7-tck-junit" depends="4jdk7compile">
           depends="4jdk7compile">  
989    
990      <junit printsummary="true"      <junit printsummary="true"
991             showoutput="true"             showoutput="true"
# Line 965  Line 1007 
1007    
1008        <test name="${jsr166.tckTestClass}" haltonfailure="no">        <test name="${jsr166.tckTestClass}" haltonfailure="no">
1009        </test>        </test>
   
1010      </junit>      </junit>
1011    </target>    </target>
1012    
1013    <target name="4jdk7-jtreg"    <target name="4jdk7-jtreg" depends="4jdk7jar">
           depends="4jdk7jar"  
           description="Runs jtreg tests for jsr166-4jdk7 using the jtreg ant task">  
1014      <run-jtreg-tests      <run-jtreg-tests
1015         target="7"         target="7"
1016         workdir="${build.4jdk7.dir}"         workdir="${build.4jdk7.dir}"
1017         classes="${4jdk7product.jar}"/>         classes="${4jdk7product.jar}"/>
1018    </target>    </target>
1019    
1020      <target name="4jdk7-test" depends="4jdk7-tck, 4jdk7-jtreg"/>
1021    
1022    <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">  
   
1023      <delete dir="${4jdk7docs.dir}"/>      <delete dir="${4jdk7docs.dir}"/>
1024      <mkdir dir="${4jdk7docs.dir}"/>      <mkdir dir="${4jdk7docs.dir}"/>
1025    
# Line 1008  Line 1040 
1040      </javadoc>      </javadoc>
1041    </target>    </target>
1042    
1043      <target name="4jdk7dist" depends="4jdk7dist-jar, 4jdk7dist-docs"/>
1044    
1045    <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">  
   
1046      <delete dir="${build.4jdk7.dir}"/>      <delete dir="${build.4jdk7.dir}"/>
   
1047    </target>    </target>
1048    
1049      <target name="4jdk7dist-jar" depends="4jdk7clean, 4jdk7jar">
   <target name="4jdk7dist-jar"  
           depends="4jdk7clean, 4jdk7jar">  
1050      <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>      <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>
1051    </target>    </target>
1052    
1053      <target name="4jdk7dist-docs" depends="4jdk7clean, 4jdk7docs">
   <target name="4jdk7dist-docs"  
           depends="4jdk7clean, 4jdk7docs">  
1054      <mirror-dir src="${4jdk7docs.dir}" dst="${dist.4jdk7docs.dir}"/>      <mirror-dir src="${4jdk7docs.dir}" dst="${dist.4jdk7docs.dir}"/>
1055    </target>    </target>
1056    
1057    
1058    <!-- jsr166x -->    <!-- jsr166x (no longer maintained) -->
   
   <target name="jsr166xcompile"  
           depends="configure-compiler"  
           description="Compiles jsr166x sources to build dir">  
1059    
1060      <target name="jsr166xcompile" depends="configure-compiler">
1061      <mkdir dir="${build.jsr166x.classes.dir}"/>      <mkdir dir="${build.jsr166x.classes.dir}"/>
1062    
1063      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1053  Line 1071 
1071             target="5"             target="5"
1072             includeAntRuntime="false"             includeAntRuntime="false"
1073             includeJavaRuntime="false"             includeJavaRuntime="false"
1074               encoding="ASCII"
1075             executable="${javac7}"             executable="${javac7}"
1076             fork="true">             fork="true">
   
1077        <include name="jsr166x/**/*.java"/>        <include name="jsr166x/**/*.java"/>
1078        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
1079        <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>
1080        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1081        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1082      </javac>      </javac>
1083    </target>    </target>
1084    
1085      <target name="jsr166xjar" depends="jsr166xcompile">
   <target name="jsr166xjar"  
           depends="jsr166xcompile"  
           description="Builds library jar from compiled sources">  
   
1086      <jar destfile="${jsr166x.jar}">      <jar destfile="${jsr166x.jar}">
1087        <fileset dir="${build.jsr166x.classes.dir}"/>        <fileset dir="${build.jsr166x.classes.dir}"/>
1088        <manifest>        <manifest>
# Line 1077  Line 1090 
1090          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1091        </manifest>        </manifest>
1092      </jar>      </jar>
   
1093    </target>    </target>
1094    
1095      <target name="jsr166xdocs">
   <target name="jsr166xdocs"  
           description="Builds javadocs to dist dir">  
   
1096      <delete dir="${jsr166xdocs.dir}"/>      <delete dir="${jsr166xdocs.dir}"/>
1097      <mkdir dir="${jsr166xdocs.dir}"/>      <mkdir dir="${jsr166xdocs.dir}"/>
1098    
# Line 1098  Line 1107 
1107               failonerror = "true">               failonerror = "true">
1108        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1109        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1110      </javadoc>      </javadoc>
1111    </target>    </target>
1112    
1113      <target name="jsr166xdist" depends="jsr166xdist-jar, jsr166xdist-docs"/>
1114    
1115    <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">  
   
1116      <delete dir="${build.jsr166x.dir}"/>      <delete dir="${build.jsr166x.dir}"/>
   
1117    </target>    </target>
1118    
1119      <target name="jsr166xdist-jar" depends="jsr166xclean, jsr166xjar">
   <target name="jsr166xdist-jar"  
           depends="jsr166xclean, jsr166xjar">  
1120      <copy file="${jsr166x.jar}" todir="${dist.dir}"/>      <copy file="${jsr166x.jar}" todir="${dist.dir}"/>
1121    </target>    </target>
1122    
1123    <target name="jsr166xdist-docs"    <target name="jsr166xdist-docs" depends="jsr166xclean, jsr166xdocs">
           depends="jsr166xclean, jsr166xdocs">  
1124      <mirror-dir src="${jsr166xdocs.dir}" dst="${dist.jsr166xdocs.dir}"/>      <mirror-dir src="${jsr166xdocs.dir}" dst="${dist.jsr166xdocs.dir}"/>
1125    </target>    </target>
1126    
   <!-- jsr166y -->  
1127    
1128      <!-- jsr166y (no longer maintained) -->
1129    
1130    <target name="jsr166ycompile"    <target name="jsr166ycompile" depends="configure-compiler">
           depends="configure-compiler"  
           description="Compiles jsr166y sources">  
   
1131      <mkdir dir="${build.jsr166y.classes.dir}"/>      <mkdir dir="${build.jsr166y.classes.dir}"/>
1132    
1133      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1146  Line 1141 
1141             bootclasspath="${bootclasspath6}"             bootclasspath="${bootclasspath6}"
1142             includeAntRuntime="false"             includeAntRuntime="false"
1143             includeJavaRuntime="false"             includeJavaRuntime="false"
1144               encoding="ASCII"
1145             executable="${javac7}"             executable="${javac7}"
1146             fork="true">             fork="true">
1147    
# Line 1154  Line 1150 
1150        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
1151        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1152        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1153      </javac>      </javac>
1154    </target>    </target>
1155    
1156      <target name="jsr166yjar" depends="jsr166ycompile">
   <target name="jsr166yjar"  
           depends="jsr166ycompile"  
           description="Builds library jar from compiled sources">  
   
1157      <jar destfile="${jsr166y.jar}" index="true">      <jar destfile="${jsr166y.jar}" index="true">
1158        <fileset dir="${build.jsr166y.classes.dir}"/>        <fileset dir="${build.jsr166y.classes.dir}"/>
1159        <manifest>        <manifest>
# Line 1170  Line 1161 
1161          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1162        </manifest>        </manifest>
1163      </jar>      </jar>
   
1164    </target>    </target>
1165    
1166      <target name="jsr166ydocs">
   <target name="jsr166ydocs"  
           description="Builds javadocs to dist dir">  
   
1167      <delete dir="${jsr166ydocs.dir}"/>      <delete dir="${jsr166ydocs.dir}"/>
1168      <mkdir dir="${jsr166ydocs.dir}"/>      <mkdir dir="${jsr166ydocs.dir}"/>
1169    
# Line 1191  Line 1178 
1178               failonerror = "true">               failonerror = "true">
1179        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1180        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1181      </javadoc>      </javadoc>
1182    </target>    </target>
1183    
1184      <target name="jsr166ydist" depends="jsr166ydist-jar, jsr166ydist-docs"/>
1185    
1186    <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">  
   
1187      <delete dir="${build.jsr166y.dir}"/>      <delete dir="${build.jsr166y.dir}"/>
   
1188    </target>    </target>
1189    
1190      <target name="jsr166ydist-jar" depends="jsr166yclean, jsr166yjar">
   <target name="jsr166ydist-jar"  
           depends="jsr166yclean, jsr166yjar">  
1191      <copy file="${jsr166y.jar}" todir="${dist.dir}"/>      <copy file="${jsr166y.jar}" todir="${dist.dir}"/>
1192    </target>    </target>
1193    
1194    <target name="jsr166ydist-docs"    <target name="jsr166ydist-docs" depends="jsr166yclean, jsr166ydocs">
           depends="jsr166yclean, jsr166ydocs">  
1195      <mirror-dir src="${jsr166ydocs.dir}" dst="${dist.jsr166ydocs.dir}"/>      <mirror-dir src="${jsr166ydocs.dir}" dst="${dist.jsr166ydocs.dir}"/>
1196    </target>    </target>
1197    
1198    
1199    <!-- extra166y -->    <!-- extra166y (no longer maintained) -->
   
   
   <target name="extra166ycompile"  
           depends="configure-compiler, jsr166yjar"  
           description="Compiles extra166y sources">  
1200    
1201      <target name="extra166ycompile" depends="configure-compiler, jsr166yjar">
1202      <mkdir dir="${build.extra166y.classes.dir}"/>      <mkdir dir="${build.extra166y.classes.dir}"/>
1203    
1204      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1240  Line 1212 
1212             target="6"             target="6"
1213             includeAntRuntime="false"             includeAntRuntime="false"
1214             includeJavaRuntime="false"             includeJavaRuntime="false"
1215               encoding="ASCII"
1216             executable="${javac7}"             executable="${javac7}"
1217             fork="true">             fork="true">
1218    
# Line 1248  Line 1221 
1221        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
1222        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1223        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1224      </javac>      </javac>
1225    </target>    </target>
1226    
1227      <target name="extra166yjar" depends="extra166ycompile">
   <target name="extra166yjar"  
           depends="extra166ycompile"  
           description="Builds library jar from compiled sources">  
   
1228      <jar destfile="${extra166y.jar}" index="true">      <jar destfile="${extra166y.jar}" index="true">
1229        <fileset dir="${build.extra166y.classes.dir}"/>        <fileset dir="${build.extra166y.classes.dir}"/>
1230        <manifest>        <manifest>
# Line 1264  Line 1232 
1232          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1233        </manifest>        </manifest>
1234      </jar>      </jar>
   
1235    </target>    </target>
1236    
1237      <target name="extra166ydocs">
   <target name="extra166ydocs"  
           description="Builds javadocs to build dir">  
   
1238      <delete dir="${extra166ydocs.dir}"/>      <delete dir="${extra166ydocs.dir}"/>
1239      <mkdir dir="${extra166ydocs.dir}"/>      <mkdir dir="${extra166ydocs.dir}"/>
1240    
# Line 1284  Line 1248 
1248               executable="${javadoc7}">               executable="${javadoc7}">
1249        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1250        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1251      </javadoc>      </javadoc>
1252    </target>    </target>
1253    
1254      <target name="extra166ydist" depends="extra166ydist-jar, extra166ydist-docs"/>
1255    
1256    <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">  
   
1257      <delete dir="${build.extra166y.dir}"/>      <delete dir="${build.extra166y.dir}"/>
   
1258    </target>    </target>
1259    
1260      <target name="extra166ydist-jar" depends="extra166yclean, extra166yjar">
   <target name="extra166ydist-jar"  
           depends="extra166yclean, extra166yjar">  
1261      <copy file="${extra166y.jar}" todir="${dist.dir}"/>      <copy file="${extra166y.jar}" todir="${dist.dir}"/>
1262    </target>    </target>
1263    
1264    <target name="extra166ydist-docs"    <target name="extra166ydist-docs" depends="extra166yclean, extra166ydocs">
           depends="extra166yclean, extra166ydocs">  
1265      <mirror-dir src="${extra166ydocs.dir}" dst="${dist.extra166ydocs.dir}"/>      <mirror-dir src="${extra166ydocs.dir}" dst="${dist.extra166ydocs.dir}"/>
1266    </target>    </target>
1267    
1268    <!-- jsr166e -->  
1269      <!-- jsr166e (no longer maintained) -->
1270    
1271    <property name="build.jsr166e.java.version" value="6"/>    <property name="build.jsr166e.java.version" value="6"/>
1272    <property name="build.jsr166e.javac" value="${javac6}"/>    <property name="build.jsr166e.javac" value="${javac6}"/>
1273    
1274    <target name="jsr166ecompile"    <target name="jsr166ecompile" depends="configure-compiler">
           depends="configure-compiler"  
           description="Compiles jsr166e sources">  
   
1275      <mkdir dir="${build.jsr166e.classes.dir}"/>      <mkdir dir="${build.jsr166e.classes.dir}"/>
1276    
1277      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1341  Line 1292 
1292        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
1293        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1294        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
   
1295      </javac>      </javac>
1296    </target>    </target>
1297    
   <!-- jsr166e: find doclint errors -->  
1298    <target name="jsr166edoclint">    <target name="jsr166edoclint">
   
1299      <mkdir dir="${build.jsr166e.classes.dir}"/>      <mkdir dir="${build.jsr166e.classes.dir}"/>
1300    
1301      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
# Line 1369  Line 1317 
1317        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
1318        <compilerarg value="-Werror"/>        <compilerarg value="-Werror"/>
1319        <compilerarg value="-Xdoclint:all/protected"/>        <compilerarg value="-Xdoclint:all/protected"/>
   
1320      </javac>      </javac>
1321    </target>    </target>
1322    
1323      <target name="jsr166ejar" depends="jsr166ecompile">
   <target name="jsr166ejar"  
           depends="jsr166ecompile"  
           description="Builds library jar from compiled sources">  
   
1324      <jar destfile="${jsr166e.jar}" index="true">      <jar destfile="${jsr166e.jar}" index="true">
1325        <fileset dir="${build.jsr166e.classes.dir}"/>        <fileset dir="${build.jsr166e.classes.dir}"/>
1326        <manifest>        <manifest>
# Line 1385  Line 1328 
1328          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>          <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1329        </manifest>        </manifest>
1330      </jar>      </jar>
   
1331    </target>    </target>
1332    
1333      <target name="jsr166edocs">
   <target name="jsr166edocs"  
           description="Builds javadocs to build dir">  
   
1334      <delete dir="${jsr166edocs.dir}"/>      <delete dir="${jsr166edocs.dir}"/>
1335      <mkdir dir="${jsr166edocs.dir}"/>      <mkdir dir="${jsr166edocs.dir}"/>
1336    
# Line 1405  Line 1344 
1344               failonerror = "true">               failonerror = "true">
1345        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1346        <arg value="-XDignore.symbol.file=true"/>        <arg value="-XDignore.symbol.file=true"/>
   
1347      </javadoc>      </javadoc>
1348    </target>    </target>
1349    
1350      <target name="jsr166e-tck-one-java-version" depends="jsr166ejar">
   <target name="jsr166e-tck-one-java-version"  
           depends="jsr166ejar">  
   
1351      <echo message="Testing with jdk${build.jsr166e.java.version} ..."/>      <echo message="Testing with jdk${build.jsr166e.java.version} ..."/>
   
1352      <run-tck-tests      <run-tck-tests
1353        tck.src.dir="${test.src.dir}/tck-jsr166e"        tck.src.dir="${test.src.dir}/tck-jsr166e"
1354        target="${build.jsr166e.java.version}"        target="${build.jsr166e.java.version}"
# Line 1422  Line 1356 
1356        classes="${jsr166e.jar}"/>        classes="${jsr166e.jar}"/>
1357    </target>    </target>
1358    
1359    <target name="jsr166e-tck"    <target name="jsr166e-tck">
           description="Runs tck tests for jsr166e for multiple java versions">  
1360    
1361  <!--     <antcall target="clean"/> -->  <!--     <antcall target="clean"/> -->
1362  <!--     <antcall target="jsr166e-tck-one-java-version"> -->  <!--     <antcall target="jsr166e-tck-one-java-version"> -->
# Line 1444  Line 1377 
1377      </antcall>      </antcall>
1378    </target>    </target>
1379    
1380      <target name="jsr166e-test" depends="jsr166e-tck"/>
1381    
1382    <target name="jsr166e-test"    <target name="jsr166edist" depends="jsr166edist-jar, jsr166edist-docs"/>
           depends="jsr166e-tck"  
           description="Runs all tests for jsr166e">  
   </target>  
1383    
1384    <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">  
1385      <delete dir="${build.jsr166e.dir}"/>      <delete dir="${build.jsr166e.dir}"/>
1386    </target>    </target>
1387    
   
1388    <target name="jsr166edist-jar"    <target name="jsr166edist-jar"
1389            depends="jsr166eclean, jsr166ejar">            depends="jsr166eclean, jsr166ejar">
1390      <copy file="${jsr166e.jar}" todir="${dist.dir}"/>      <copy file="${jsr166e.jar}" todir="${dist.dir}"/>
1391    </target>    </target>
1392    
1393    <target name="jsr166edist-docs"    <target name="jsr166edist-docs" depends="jsr166eclean, jsr166edocs">
           depends="jsr166eclean, jsr166edocs">  
1394      <mirror-dir src="${jsr166edocs.dir}" dst="${dist.jsr166edocs.dir}"/>      <mirror-dir src="${jsr166edocs.dir}" dst="${dist.jsr166edocs.dir}"/>
1395    </target>    </target>
1396    
1397    
1398  <!-- Find buglets that can be detected by static build tools -->  <!-- Find buglets that can be detected by static build tools -->
1399    
1400    <target name="lint">  <!--   <target name="lint"> -->
1401      <antcall target="dists">  <!--     <antcall target="dists"> -->
1402        <param name="build.javadoc.access" value="public"/>  <!--       <param name="build.javadoc.access" value="protected"/> -->
1403      </antcall>  <!--     </antcall> -->
1404    </target>  <!--   </target> -->
1405    
1406  <!-- Generates all doclint warnings, even for private methods (rarely useful) -->  <!-- Generates all doclint warnings, even for private methods (rarely useful) -->
1407    <target name="lint-private">    <target name="doclint-private">
1408      <antcall target="dist">      <antcall target="dist">
1409        <param name="build.javadoc.access" value="private"/>        <param name="build.javadoc.access" value="private"/>
1410      </antcall>      </antcall>
1411    </target>    </target>
1412    
1413    
1414    <!-- ==============================================================
1415      Experimental errorprone support
1416      https://errorprone.info
1417      https://errorprone.info/docs/installation
1418      https://github.com/google/error-prone/issues/1143
1419    =================================================================== -->
1420      <path id="errorprone.processorpath.path">
1421        <pathelement location="${lib.dir}/error_prone_core-2.3.2-with-dependencies.jar"/>
1422        <pathelement location="${lib.dir}/dataflow-2.5.7.jar"/>
1423        <pathelement location="${lib.dir}/javacutil-2.5.7.jar"/>
1424        <pathelement location="${lib.dir}/jFormatString-3.0.0.jar"/>
1425      </path>
1426      <property name="errorprone.processorpath" refid="errorprone.processorpath.path" />
1427      <property name="errorprone.jsr166.user.flags" value=""/>
1428      <property name="errorprone.jsr166.flags"
1429                value="-Xep:HashtableContains:OFF
1430                       -Xep:JdkObsolete:OFF
1431                       -Xep:MissingOverride:OFF
1432                       -Xep:MissingFail:OFF
1433                       -Xep:ThreadPriorityCheck:OFF
1434                       -Xep:MixedArrayDimensions:ERROR
1435                       -Xep:RemoveUnusedImports:ERROR
1436                       -Xep:EmptyIf:ERROR
1437                       -Xep:MultipleTopLevelClasses:ERROR
1438                       -Xep:ClassName:ERROR
1439                       -Xep:LongLiteralLowerCaseSuffix:ERROR
1440                       -Xep:RedundantThrows:ERROR
1441                       -Xep:IdentityBinaryExpression:WARN
1442                       -Xep:ConstructorInvokesOverridable:WARN
1443                       -Xep:MethodCanBeStatic:WARN
1444                       ${errorprone.jsr166.user.flags}"/>
1445      <!-- -Xep:WildcardImport:ERROR -->
1446      <property name="errorprone.jsr166.test.flags"
1447                value="-Xep:StringSplitter:OFF
1448                       -Xep:BoxedPrimitiveConstructor:OFF
1449                       -Xep:ModifyingCollectionWithItself:OFF"/>
1450      <!-- ant -emacs errorprone |& grep -EA1 '(warning|error):|warnings' -->
1451      <target name="errorprone"
1452              depends="clean, configure-compiler"
1453              description="Run errorprone over jsr166 source code (experimental)">
1454    
1455        <local name="destdir"/>
1456        <property name="destdir" value="${build.classes.dir}/java.base"/>
1457        <mkdir dir="${destdir}"/>
1458    
1459        <javac srcdir="${src.dir}"
1460               destdir="${destdir}"
1461               debug="${build.debug}"
1462               debuglevel="${build.debuglevel}"
1463               deprecation="${build.deprecation}"
1464               classpath=""
1465               includeAntRuntime="false"
1466               includeJavaRuntime="false"
1467               encoding="ASCII"
1468               executable="${build.main.javac}"
1469               fork="true">
1470    
1471          <include name="**/*.java"/>
1472          <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1473          <compilerarg value="-J--illegal-access=permit"/>
1474          <compilerarg value="-XDcompilePolicy=simple"/>
1475          <compilerarg value="-processorpath"/>
1476          <compilerarg pathref="errorprone.processorpath.path"/>
1477          <compilerarg value="-Xplugin:ErrorProne
1478                              ${errorprone.jsr166.flags}"/>
1479          <compilerarg value="--patch-module=java.base=${src.dir}"/>
1480          <compilerarg value="-Xprefer:source"/>
1481          <compilerarg value="-XDignore.symbol.file=true"/>
1482          <compilerarg value="-Xlint:all"/>
1483          <compilerarg value="-Xdoclint:all/protected,reference/private"/>
1484          <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1485          <compilerarg line="${build.args}"/>
1486        </javac>
1487    
1488        <jar destfile="${product.jar}">
1489          <fileset dir="${destdir}"/>
1490        </jar>
1491    
1492        <run-tck-tests
1493          target="${java.runtime.target}"
1494          workdir="${build.dir}"
1495          classes="${product.jar}">
1496          <javac-elements>
1497            <!-- Needed to silence -Xep:FutureReturnValueIgnored -->
1498            <compilerarg value="-J--illegal-access=permit"/>
1499            <compilerarg value="-XDcompilePolicy=simple"/>
1500            <compilerarg line="-processorpath ${errorprone.processorpath}"/>
1501            <compilerarg value="-Xplugin:ErrorProne
1502                                ${errorprone.jsr166.flags}
1503                                ${errorprone.jsr166.test.flags}"/>
1504            <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1505          </javac-elements>
1506        </run-tck-tests>
1507      </target>
1508    
1509      <!-- ant -emacs errorprone-jtreg |& grep -EA1 '(warning|error):' -->
1510      <!-- -XDcompilePolicy=simple or byfile avoids confusing UnusedImports -->
1511      <target name="errorprone-jtreg"
1512              depends="jar"
1513              description="Run errorprone over jtreg tests (experimental)">
1514    
1515        <run-jtreg-tests
1516           target="${java.runtime.target}"
1517           workdir="${build.dir}"
1518           classes="${product.jar}"
1519           verbose="all">
1520          <jtreg-elements>
1521            <arg value="-javacoption:-XDcompilePolicy=simple"/>
1522            <arg value="-javacoption:-processorpath"/>
1523            <arg value="-javacoption:${errorprone.processorpath}"/>
1524            <arg value="-javacoption:-Xplugin:ErrorProne
1525                                ${errorprone.jsr166.flags}
1526                                ${errorprone.jsr166.test.flags}
1527                                -Xep:MultipleTopLevelClasses:WARN
1528                                -Xep:NonAtomicVolatileUpdate:OFF"/>
1529          </jtreg-elements>
1530        </run-jtreg-tests>
1531      </target>
1532    
1533    
1534    <!-- ==============================================================
1535      Running guava tests against jsr166 code
1536    =================================================================== -->
1537    
1538    <!-- <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" -->
1539    <!--   organisation="com.google.guava" module="guava-testlib" revision="21.0"/> -->
1540    <!-- <property name="guava.version" value="21.0"/> -->
1541    
1542    <!-- HOWTO debug print a path id -->
1543    <!-- <pathconvert property="guava.testlib.classpath" refid="guava.testlib.classpath" /> -->
1544    <!-- <echo message="guava.testlib.classpath=${guava.testlib.classpath}"/> -->
1545    
1546    <!-- <ivy:retrieve pathid="guava.tests.classpath" type="jar" inline="true" conf="*" pattern="${lib.dir}/[type]/[artifact].[ext]" -->
1547    <!--   organisation="com.google.guava" module="guava-tests"/> -->
1548    <!-- <get src="http://repo2.maven.org/maven2/com/google/guava/guava-tests/${guava.version}/guava-tests-${guava.version}-tests.jar" -->
1549    <!--   dest="${lib.dir}/jar/guava-tests-tests.jar" usetimestamp="true"/> -->
1550    <!--     <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" type="*" -->
1551    <!--       organisation="com.google.guava" module="guava-testlib" revision="${guava.version}"/> -->
1552    
1553    <!-- <test name="com.google.common.collect.testing.TestsForQueuesInJavaUtil"/> -->
1554    <!-- <test name="com.google.common.collect.testing.TestsForListsInJavaUtil"/> -->
1555    <!-- <test name="com.google.common.collect.testing.TestsForSetsInJavaUtil"/> -->
1556    <!-- <test name="com.google.common.collect.testing.TestsForMapsInJavaUtil"/> -->
1557    
1558    <!-- <ivy:retrieve pathid="guava.testlib.classpath" -->
1559    <!--   type="*" inline="true" conf="*(private),*(public)" -->
1560    <!--   pattern="${guava.dir}/[artifact].[ext]" -->
1561    <!--   organisation="com.google.guava" module="guava-testlib"/> -->
1562    
1563    <!-- Work around bug below by downloading guava-testlib-tests.jar "by hand": -->
1564    <!-- https://issues.apache.org/jira/browse/IVY-1444 -->
1565    <!-- maven tests artifacts cannot be downloaded because they are mapped to private configurations -->
1566    
1567      <target name="init-ivy">
1568        <get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar"
1569             dest="${build.dir}/ivy.jar" usetimestamp="true" skipexisting="true"/>
1570        <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant"
1571                 classpath="${build.dir}/ivy.jar"/>
1572      </target>
1573    
1574      <target name="guava-tests" depends="jar, init-ivy"
1575              description="Guava tests run against jsr166 collections">
1576        <property name="guava.dir" value="${build.dir}/guava-testlib"/>
1577        <mkdir dir="${guava.dir}"/>
1578        <ivy:retrieve pathid="guava.testlib.classpath"
1579          type="jar,bundle" inline="true" conf="default,master"
1580          pattern="${guava.dir}/[artifact].[ext]"
1581          organisation="com.google.guava" module="guava-testlib"/>
1582        <property name="guava.version" value="21.0"/>
1583        <get src="http://repo2.maven.org/maven2/com/google/guava/guava-testlib/${guava.version}/guava-testlib-${guava.version}-tests.jar"
1584             dest="${guava.dir}/guava-testlib-tests.jar" usetimestamp="true"/>
1585        <junit printsummary="true" showoutput="true" haltonfailure="true"
1586               jvm="${build.main.java}" fork="true">
1587          <jvmarg line="-ea -esa --patch-module=java.base=${product.jar}"/>
1588          <formatter type="brief"/>
1589          <classpath>
1590            <pathelement location="${guava.dir}/guava-testlib-tests.jar"/>
1591            <path refid="guava.testlib.classpath"/>
1592          </classpath>
1593    
1594          <!-- "6" in "OpenJdk6Tests" misleadingly means "6+" -->
1595          <test name="com.google.common.collect.testing.OpenJdk6Tests"/>
1596        </junit>
1597      </target>
1598    
1599  </project>  </project>

Legend:
Removed from v.1.213  
changed lines
  Added in v.1.294

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