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

Diff of /jsr166/build.xml

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

revision 1.100, Sat Jan 19 17:15:44 2013 UTC revision 1.259, Mon Dec 18 21:07:18 2017 UTC
# Line 1  Line 1 
1  <project name="jsr166" default="usage">  <project name="jsr166" default="usage"
2      xmlns:if="ant:if" xmlns:unless="ant:unless"
3      xmlns:ivy="antlib:org.apache.ivy.ant">
4    
5    <description>    <description>
6  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
# Line 6  Line 8 
8    
9    Usage: ant [target]    Usage: ant [target]
10    
11      See http://gee.cs.oswego.edu/dl/concurrency-interest/index.html for
12      more details.
13    
14    User-specific settings are read from user.properties.    User-specific settings are read from user.properties.
15    See user.properties.sample for an explanation of some useful settings.    See user.properties.sample for an explanation of some useful settings.
16    
# Line 13  Line 18 
18    itself.  Because the JDK version matters and because different    itself.  Because the JDK version matters and because different
19    targets require different JDKs, we assume that users have created a    targets require different JDKs, we assume that users have created a
20    hierarchy containing:    hierarchy containing:
   $HOME/jdk/jdk6  
   $HOME/jdk/jdk7  
21    $HOME/jdk/jdk8    $HOME/jdk/jdk8
22      $HOME/jdk/jdk9
23      $HOME/jdk/jdk10
24    where each of the above is a JDK or a symlink to same, and    where each of the above is a JDK or a symlink to same, and
   $HOME/jdk/src/jdk6  
   $HOME/jdk/src/jdk7  
25    $HOME/jdk/src/jdk8    $HOME/jdk/src/jdk8
26      $HOME/jdk/src/jdk9
27      $HOME/jdk/src/jdk10
28    where each of the above is a complete JDK source tree    where each of the above is a complete JDK source tree
29    (e.g. mercurial forest) or a symlink to same.    (e.g. mercurial forest) or a symlink to same.
30    
31      Alternatively, define ant variables thus:
32      ant -Djdk$N.home=... -Djdk$N.src.home=...
33      for $N in 8 9 10 ...
34    
35      As of 2016-03, the sources in src/main are for jdk9+ only.
36  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
37    </description>    </description>
38    
39    <target name="usage" description="Advises user to run with -projecthelp">    <!-- Run 'ant -projecthelp' (default target) -->
40      <echo>Run "ant -projecthelp" for full usage information.</echo>    <target name="usage">
41        <java classname="org.apache.tools.ant.Main">
42          <arg value="-projecthelp" />
43        </java>
44    </target>    </target>
45    
46      <!-- HOWTO printf debug: <echo message="prop=${prop}"/> -->
47    
48    <!-- User-specific settings -->    <!-- User-specific settings -->
49    <property file="user.properties"/>    <property file="user.properties"/>
50    
51    
52    <!-- Compilation options -->    <!-- Compilation options -->
53    <property name="build.sourcelevel"    value="1.6"/>    <property name="build.sourcelevel"    value="6"/>
54    <property name="build.debug"          value="true"/>    <property name="build.debug"          value="true"/>
55    <property name="build.debuglevel"     value="source,lines,vars"/>    <property name="build.debuglevel"     value="source,lines,vars"/>
56    <property name="build.deprecation"    value="false"/>    <property name="build.deprecation"    value="false"/>
57      <property name="build.javadoc.access" value="protected"/>
58    
59    <!-- Build locations -->    <!-- Build locations -->
60    <property name="build.dir"                   location="build"/>    <property name="build.dir"                   location="build"/>
61    <property name="build.classes.dir"           location="${build.dir}/classes"/>    <property name="build.classes.dir"           location="${build.dir}/classes"/>
62    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>    <property name="build.testcases.dir"         location="${build.dir}/testcases"/>
63    <property name="build.loops.dir"             location="${build.dir}/loops"/>    <property name="build.loops.dir"             location="${build.dir}/loops"/>
   <property name="build.lib.dir"               location="${build.dir}/lib"/>  
   <property name="build.javadocs.dir"          location="${build.dir}/javadocs"/>  
   <property name="build.reports.dir"           location="${build.dir}/reports"/>  
64    
65    <property name="build.4jdk7.dir"              location="${build.dir}/4jdk7"/>    <property name="build.4jdk7.dir"             location="${build.dir}/jsr166-4jdk7"/>
   <property name="build.4jdk7.lib.dir"          location="${build.4jdk7.dir}"/>  
66    <property name="build.4jdk7.classes.dir"      location="${build.4jdk7.dir}/classes"/>    <property name="build.4jdk7.classes.dir"      location="${build.4jdk7.dir}/classes"/>
67    <property name="build.4jdk7.tck.classes.dir"  location="${build.4jdk7.dir}/tck/classes"/>    <property name="build.4jdk7.tck.classes.dir" location="${build.4jdk7.dir}/tck-classes"/>
68    <property name="build.4jdk7.docs.dir"         location="${build.4jdk7.dir}/docs"/>    <property name="build.4jdk7.docs.dir"         location="${build.4jdk7.dir}/docs"/>
69    
70    <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>    <property name="build.4jdk8.dir"             location="${build.dir}/jsr166-4jdk8"/>
71    <property name="build.jsr166xlib.dir"        location="${build.dir}/jsr166xlib"/>    <property name="build.4jdk8.classes.dir"     location="${build.4jdk8.dir}/classes"/>
72    <property name="build.jsr166xjavadocs.dir"   location="${build.dir}/jsr166xjavadocs"/>    <property name="build.4jdk8.tck.classes.dir" location="${build.4jdk8.dir}/tck-classes"/>
73      <property name="build.4jdk8.docs.dir"        location="${build.4jdk8.dir}/docs"/>
74    
75      <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>
76    <property name="build.jsr166y.dir"           location="${build.dir}/jsr166y"/>    <property name="build.jsr166y.dir"           location="${build.dir}/jsr166y"/>
   <property name="build.jsr166ylib.dir"        location="${build.dir}/jsr166ylib"/>  
   <property name="build.jsr166yjavadocs.dir"   location="${build.dir}/jsr166yjavadocs"/>  
   
77    <property name="build.jsr166e.dir"           location="${build.dir}/jsr166e"/>    <property name="build.jsr166e.dir"           location="${build.dir}/jsr166e"/>
   <property name="build.jsr166elib.dir"        location="${build.dir}/jsr166elib"/>  
   <property name="build.jsr166ejavadocs.dir"   location="${build.dir}/jsr166ejavadocs"/>  
   
78    <property name="build.extra166y.dir"         location="${build.dir}/extra166y"/>    <property name="build.extra166y.dir"         location="${build.dir}/extra166y"/>
   <property name="build.extra166ylib.dir"      location="${build.dir}/extra166ylib"/>  
   <property name="build.extra166yjavadocs.dir" location="${build.dir}/extra166yjavadocs"/>  
79    
80    <!-- JDK binary locations -->    <property name="build.jsr166x.classes.dir"   location="${build.jsr166x.dir}/classes"/>
81      <property name="build.jsr166y.classes.dir"   location="${build.jsr166y.dir}/classes"/>
82      <property name="build.jsr166e.classes.dir"   location="${build.jsr166e.dir}/classes"/>
83      <property name="build.extra166y.classes.dir" location="${build.extra166y.dir}/classes"/>
84    
85      <!-- JDK locations -->
86    <property name="jdks.home"  location="${user.home}/jdk"/>    <property name="jdks.home"  location="${user.home}/jdk"/>
87    
88    <macrodef name="defjdklocations">    <macrodef name="defjdklocations">
# Line 81  Line 92 
92      <property name="java@{v}"       location="${jdk@{v}.home}/bin/java"/>      <property name="java@{v}"       location="${jdk@{v}.home}/bin/java"/>
93      <property name="javac@{v}"      location="${jdk@{v}.home}/bin/javac"/>      <property name="javac@{v}"      location="${jdk@{v}.home}/bin/javac"/>
94      <property name="javadoc@{v}"    location="${jdk@{v}.home}/bin/javadoc"/>      <property name="javadoc@{v}"    location="${jdk@{v}.home}/bin/javadoc"/>
95      <property name="bootdir@{v}"    location="${jdk@{v}.home}/jre/lib"/>      <property name="jdk@{v}.src.home" location="${jdks.home}/src/jdk@{v}"/>
96      <property name="jdk@{v}src.dir" location="${jdks.home}/src/jdk@{v}/jdk/src/share/classes"/>      <local name="have.java.base"/>
97      <property name="bootclasspath@{v}"      <available property="have.java.base"
98       value="${bootdir@{v}}/resources.jar:${bootdir@{v}}/rt.jar:${bootdir@{v}}/jsse.jar:${bootdir@{v}}/jce.jar:${bootdir@{v}}/:${bootdir@{v}}/charsets.jar"/>        file="${jdk@{v}.src.home}/jdk/src/java.base/share/classes" type="dir"/>
99        <property name="jdk@{v}.src.dir" location="${jdk@{v}.src.home}/jdk/src/java.base/share/classes"
100          if:set="have.java.base"/>
101        <property name="jdk@{v}.src.dir" location="${jdk@{v}.src.home}/jdk/src/share/classes"
102          unless:set="have.java.base"/>
103        <local name="modules"/>
104        <available property="modules" file="${jdk@{v}.home}/jmods" type="dir"/>
105        <local name="boot.jar.dir"/>
106        <property name="boot.jar.dir"   location="${jdk@{v}.home}/jre/lib" unless:set="modules"/>
107        <path id="bootclasspath@{v}" unless:set="modules">
108          <pathelement path="${boot.jar.dir}/resources.jar"/>
109          <pathelement path="${boot.jar.dir}/rt.jar"/>
110          <pathelement path="${boot.jar.dir}/jsse.jar"/>
111          <pathelement path="${boot.jar.dir}/jce.jar"/>
112          <pathelement path="${boot.jar.dir}/charsets.jar"/>
113        </path>
114        <property name="bootclasspath@{v}" value="${toString:bootclasspath@{v}}" unless:set="modules"/>
115      </sequential>      </sequential>
116    </macrodef>    </macrodef>
117    
118    <defjdklocations v="6"/>    <macrodef name="mirror-dir">
119    <defjdklocations v="7"/>      <attribute name="src"/>
120    <defjdklocations v="8"/>      <attribute name="dst"/>
   
   <macrodef name="run-tck-tests">  
     <attribute name="jvm"/>  
     <attribute name="tck.classes"/>  
     <attribute name="product.jar" default="${product.jar}"/>  
     <attribute name="jvmflags" default=""/>  
121      <sequential>      <sequential>
122      <java classname="JSR166TestCase"      <delete dir="@{dst}"/>
123            jvm="@{jvm}" fork="true">      <mkdir dir="@{dst}"/>
124          <jvmarg value="-Xbootclasspath/p:@{product.jar}"/>      <copy todir="@{dst}" preservelastmodified="true">
125          <jvmarg line="@{jvmflags}"/>        <fileset dir="@{src}"/>
126          <classpath>      </copy>
           <pathelement location="${junit.jar}"/>  
           <pathelement location="@{tck.classes}"/>  
         </classpath>  
     </java>  
127      </sequential>      </sequential>
128    </macrodef>    </macrodef>
129    
130      <defjdklocations v="6"/>
131      <defjdklocations v="7"/>
132      <defjdklocations v="8"/>
133      <defjdklocations v="9"/>
134      <defjdklocations v="10"/>
135    
136    <!-- Source locations -->    <!-- Source locations -->
137    <property name="src.dir"              location="${basedir}/src/main"/>    <property name="src.dir"              location="${basedir}/src/main"/>
138    <property name="test.src.dir"         location="${basedir}/src/test"/>    <property name="test.src.dir"         location="${basedir}/src/test"/>
139    <property name="loops.src.dir"        location="${basedir}/src/loops"/>    <property name="loops.src.dir"        location="${basedir}/src/loops"/>
140    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
141    <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>    <property name="jtreg7.src.dir"       location="${test.src.dir}/jtreg-jdk7"/>
142      <property name="jtreg8.src.dir"       location="${test.src.dir}/jtreg-jdk8"/>
143      <property name="jtreg9.src.dir"       location="${test.src.dir}/jtreg"/>
144      <property name="jtreg10.src.dir"      location="${test.src.dir}/jtreg"/>
145      <property name="jtreg.src.dir"        location="${jtreg9.src.dir}"/>
146    <property name="lib.dir"              location="${basedir}/lib"/>    <property name="lib.dir"              location="${basedir}/lib"/>
147    <property name="dist.dir"             location="${basedir}/dist"/>    <property name="dist.dir"             location="${basedir}/dist"/>
148    <property name="topsrc.dir"           location="${basedir}/src"/>    <property name="topsrc.dir"           location="${basedir}/src"/>
149    <property name="4jdk7src.dir"         location="${topsrc.dir}/jdk7"/>    <property name="4jdk7src.dir"         location="${topsrc.dir}/jdk7"/>
150      <property name="4jdk8src.dir"         location="${topsrc.dir}/jdk8"/>
151    <property name="jsr166xsrc.dir"       location="${topsrc.dir}/jsr166x"/>    <property name="jsr166xsrc.dir"       location="${topsrc.dir}/jsr166x"/>
152    <property name="jsr166ysrc.dir"       location="${topsrc.dir}/jsr166y"/>    <property name="jsr166ysrc.dir"       location="${topsrc.dir}/jsr166y"/>
153    <property name="jsr166esrc.dir"       location="${topsrc.dir}/jsr166e"/>    <property name="jsr166esrc.dir"       location="${topsrc.dir}/jsr166e"/>
154    <property name="extra166ysrc.dir"     location="${topsrc.dir}/extra166y"/>    <property name="extra166ysrc.dir"     location="${topsrc.dir}/extra166y"/>
   <property name="jdksrc.dir"           location="/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"/>  
155    
156    <!-- Distribution locations -->    <!-- Javadoc locations -->
157    <property name="dist.javadocs.dir"           location="${dist.dir}/docs"/>    <property name="docs.dir"          location="${build.dir}/docs"/>
158    <property name="dist.4jdk7.docs.dir"         location="${dist.dir}/jsr166-4jdk7docs"/>    <property name="4jdk7docs.dir"     location="${build.4jdk7.dir}/docs"/>
159    <property name="dist.jsr166xjavadocs.dir"    location="${dist.dir}/jsr166xdocs"/>    <property name="4jdk8docs.dir"     location="${build.4jdk8.dir}/docs"/>
160    <property name="dist.jsr166yjavadocs.dir"    location="${dist.dir}/jsr166ydocs"/>    <property name="jsr166xdocs.dir"   location="${build.jsr166x.dir}/docs"/>
161    <property name="dist.jsr166ejavadocs.dir"    location="${dist.dir}/jsr166edocs"/>    <property name="jsr166ydocs.dir"   location="${build.jsr166y.dir}/docs"/>
162    <property name="dist.extra166yjavadocs.dir"  location="${dist.dir}/extra166ydocs"/>    <property name="jsr166edocs.dir"   location="${build.jsr166e.dir}/docs"/>
163      <property name="extra166ydocs.dir" location="${build.extra166y.dir}/docs"/>
164    
165      <property name="dist.docs.dir"          location="${dist.dir}/docs"/>
166      <property name="dist.4jdk7docs.dir"     location="${dist.dir}/jsr166-4jdk7docs"/>
167      <property name="dist.4jdk8docs.dir"     location="${dist.dir}/jsr166-4jdk8docs"/>
168      <property name="dist.jsr166xdocs.dir"   location="${dist.dir}/jsr166xdocs"/>
169      <property name="dist.jsr166ydocs.dir"   location="${dist.dir}/jsr166ydocs"/>
170      <property name="dist.jsr166edocs.dir"   location="${dist.dir}/jsr166edocs"/>
171      <property name="dist.extra166ydocs.dir" location="${dist.dir}/extra166ydocs"/>
172    
173    <!-- Jar locations -->    <!-- Jar locations -->
174    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>    <property name="product.jar"      location="${build.dir}/jsr166.jar"/>
175    <property name="4jdk7product.jar"     location="${build.4jdk7.lib.dir}/jsr166-4jdk7.jar"/>    <property name="4jdk7product.jar" location="${build.4jdk7.dir}/jsr166-4jdk7.jar"/>
176    <property name="jsr166xproduct.jar"   location="${build.jsr166xlib.dir}/jsr166x.jar"/>    <property name="4jdk8product.jar" location="${build.4jdk8.dir}/jsr166-4jdk8.jar"/>
177    <property name="jsr166yproduct.jar"   location="${build.jsr166ylib.dir}/jsr166y.jar"/>    <property name="jsr166x.jar"      location="${build.jsr166x.dir}/jsr166x.jar"/>
178    <property name="jsr166eproduct.jar"   location="${build.jsr166elib.dir}/jsr166e.jar"/>    <property name="jsr166y.jar"      location="${build.jsr166y.dir}/jsr166y.jar"/>
179    <property name="extra166yproduct.jar" location="${build.extra166ylib.dir}/extra166y.jar"/>    <property name="jsr166e.jar"      location="${build.jsr166e.dir}/jsr166e.jar"/>
180      <property name="extra166y.jar"    location="${build.extra166y.dir}/extra166y.jar"/>
181    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
182    
183    <!-- Bootclasspath argument -->    <!-- Canonical location of jdk docs root, to use with javadoc -Xdocrootparent flag -->
184    <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>    <!-- Switched to https: in 2017-10 - JDK-8190312 -->
185      <property name="java5.docroot.url"  value="https://docs.oracle.com/javase/1.5.0/docs"/>
186      <property name="java6.docroot.url"  value="https://docs.oracle.com/javase/6/docs"/>
187      <property name="java7.docroot.url"  value="https://docs.oracle.com/javase/7/docs"/>
188      <property name="java8.docroot.url"  value="https://docs.oracle.com/javase/8/docs"/>
189      <property name="java9.docroot.url"  value="https://docs.oracle.com/javase/9/docs"/>
190      <!-- The location of jdk9 early access docs (RIP) -->
191      <!-- <property name="java9.docroot.url" value="http://download.java.net/java/jdk9/docs"/> -->
192      <!-- Default jdk doc location (latest stable release seems best) -->
193      <property name="java10.docroot.url" value="http://download.java.net/java/jdk10/docs"/>
194      <property name="java.docroot.url"   value="${java9.docroot.url}"/>
195    
196    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
197    <property name="jdkapi5docs.url"      value="http://docs.oracle.com/javase/1.5.0/docs/api/"/>    <property name="java5.api.url"      value="${java5.docroot.url}/api/"/>
198    <property name="jdkapi6docs.url"      value="http://docs.oracle.com/javase/6/docs/api/"/>    <property name="java6.api.url"      value="${java6.docroot.url}/api/"/>
199    <property name="jdkapi7docs.url"      value="http://docs.oracle.com/javase/7/docs/api/"/>    <property name="java7.api.url"      value="${java7.docroot.url}/api/"/>
200      <property name="java8.api.url"      value="${java8.docroot.url}/api/"/>
201    <property name="jdkapi8docs.url"      value="http://download.java.net/jdk8/docs/api/"/>    <property name="java9.api.url"      value="${java9.docroot.url}/api/"/>
202    <!-- The below does not yet exist as of 2012-11 -->    <property name="java10.api.url"     value="${java10.docroot.url}/api/"/>
203    <!-- <property name="jdkapi8docs.url" value="http://docs.oracle.com/javase/8/docs/api/"/> -->    <property name="java.api.url"       value="${java.docroot.url}/api/"/>
204    <property name="jdkapidocs.url"       value="${jdkapi7docs.url}"/>  
205      <!-- Define the "jtreg" task -->
206    <!-- Test classpath -->    <!-- See the docs in "jtreg -onlineHelp" -->
207    <path id="test.classpath">    <taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant"
208      <pathelement location="${build.testcases.dir}"/>             classpath="${lib.dir}/jtreg.jar" />
209    
210      <!-- Tck options; see JSR166TestCase.java
211       To profile a single tck test class:
212       ant -Djsr166.profileTests=true -Djsr166.profileThreshold=10 -Djsr166.tckTestClass=CompletableFutureTest tck
213       To stress test a single tck test class:
214       ant -Djsr166.tckTestClass=CountedCompleterTest -Djsr166.runsPerTest=100 tck
215       To stress test a single tck test method:
216       ant -Djsr166.tckTestClass=RecursiveTaskTest -Djsr166.runsPerTest=1000 -Djsr166.methodFilter=testAbnormalInvokeAll3 tck
217      -->
218      <property name="jsr166.tckTestClass"     value="JSR166TestCase"/>
219      <macrodef name="run-tck-tests">
220        <attribute name="tck.src.dir" default="${tck.src.dir}"/>
221        <attribute name="target"/>
222        <attribute name="compile-target" default="@{target}"/>
223        <attribute name="workdir"/>
224        <attribute name="classes"/>
225        <!--
226            <attribute name="jvmflags" default="-XX:+UseParallelGC -XX:-UseBiasedLocking -ea -esa -Djsr166.testImplementationDetails=true"/>
227        -->
228            <attribute name="jvmflags" default="-ea -esa -Djsr166.testImplementationDetails=true"/>
229        <element name="javac-elements" optional="true"/>
230    
231        <sequential>
232    
233        <local name="modules"/>
234        <condition property="modules">
235          <available file="${jdk@{compile-target}.home}/jmods" type="dir"/>
236        </condition>
237    
238        <local name="use-doclint"/>
239        <condition property="use-doclint">
240          <not> <equals arg1="@{target}" arg2="7"/> </not>
241        </condition>
242    
243        <mkdir dir="@{workdir}/tck-classes"/>
244    
245        <javac srcdir="@{tck.src.dir}"
246               destdir="@{workdir}/tck-classes"
247               debug="${build.debug}"
248               debuglevel="${build.debuglevel}"
249               deprecation="${build.deprecation}"
250               source="@{compile-target}"
251               target="@{compile-target}"
252               classpath="${junit.jar}"
253               includeAntRuntime="false"
254               includeJavaRuntime="false"
255               encoding="ASCII"
256               executable="${javac@{compile-target}}"
257               fork="true">
258    
259          <include name="*.java"/>
260          <compilerarg value="-XDignore.symbol.file=true"/>
261          <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>
262          <compilerarg value="-Xdoclint:reference/private" if:set="use-doclint"/>
263          <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
264          <compilerarg value="--patch-module=java.base=@{classes}" if:set="modules"/>
265          <compilerarg line="${build.args}"/>
266          <javac-elements/>
267    
268        </javac>
269    
270        <java classname="${jsr166.tckTestClass}"
271              failonerror="true"
272              jvm="${java@{target}}"
273              fork="true">
274            <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
275            <jvmarg value="--patch-module=java.base=@{classes}" if:set="modules"/>
276            <jvmarg value="--add-opens=java.base/java.lang=ALL-UNNAMED" if:set="modules"/>
277            <jvmarg value="--add-opens=java.base/java.util=ALL-UNNAMED" if:set="modules"/>
278            <jvmarg value="--add-opens=java.base/java.util.concurrent=ALL-UNNAMED" if:set="modules"/>
279            <jvmarg value="--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED" if:set="modules"/>
280            <jvmarg value="--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED" if:set="modules"/>
281            <jvmarg line="@{jvmflags}"/>
282            <!-- ant -Dvmoptions="-Xmx8m" -Djsr166.tckTestClass=CompletableFutureTest tck -->
283            <jvmarg line="${vmoptions}" if:set="vmoptions"/>
284    
285            <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
286            <syspropertyset id="system-properties-used-by-tck">
287              <propertyref prefix="java.util.concurrent.ForkJoinPool"/>
288              <propertyref prefix="jsr166."/>
289              <propertyref name="test.timeout.factor"/>
290            </syspropertyset>
291    
292            <classpath>
293      <pathelement location="${junit.jar}"/>      <pathelement location="${junit.jar}"/>
294    </path>            <pathelement location="@{workdir}/tck-classes"/>
295            </classpath>
296        </java>
297    
298        </sequential>
299      </macrodef>
300    
301      <!-- Define jtreg test sets for different jdk versions -->
302      <fileset dir="${jtreg10.src.dir}">
303        <patternset id="jdk10.jtreg.tests">
304          <include name="**/*.java"/>
305        </patternset>
306      </fileset>
307    
308      <fileset dir="${jtreg9.src.dir}">
309        <patternset id="jdk9.jtreg.tests">
310          <include name="**/*.java"/>
311        </patternset>
312      </fileset>
313    
314      <fileset dir="${jtreg8.src.dir}">
315        <patternset id="jdk8.jtreg.tests">
316          <include name="**/*.java"/>
317        </patternset>
318      </fileset>
319    
320      <fileset dir="${jtreg7.src.dir}">
321        <patternset id="jdk7.jtreg.tests">
322          <include name="**/*.java"/>
323        </patternset>
324      </fileset>
325    
326      <!-- ant -Djtreg.flags=-timeoutFactor:4 -->
327      <property name="jtreg.flags" value=""/>
328    
329      <macrodef name="run-jtreg-tests">
330        <!-- ant -Djtreg9.src.dir=src/test/jtreg/util/concurrent/CompletableFuture jtreg -->
331        <attribute name="target"/>
332        <attribute name="workdir"/>
333        <attribute name="classes"/>
334        <attribute name="verbose" default="${jtreg.verbose}"/>
335        <attribute name="jtregflags" default=""/>
336        <element name="jtreg-elements" optional="true"/>
337    
338        <sequential>
339    
340        <!-- ant -Djtreg.verbose=time,fail,error jtreg -->
341        <property name="jtreg.verbose" value="nopass,fail,error"/>
342    
343        <local name="modules"/>
344        <condition property="modules">
345          <available file="${jdk@{target}.home}/jmods" type="dir"/>
346        </condition>
347    
348        <delete dir="@{workdir}/JTwork"   quiet="true"/>
349        <jtreg dir="${jtreg@{target}.src.dir}"
350               jdk="${jdk@{target}.home}"
351               workDir="@{workdir}/JTwork">
352          <patternset refid="jdk@{target}.jtreg.tests"/>
353          <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
354          <arg value="-javacoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
355          <arg value="-vmoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
356          <arg value="-agentvm"/>
357          <arg value="-noreport"/>
358          <arg value="-verbose:@{verbose}"/>
359          <arg value="-vmoptions:-esa -ea"/>
360          <arg value="-automatic"/>
361          <arg value="-k:!ignore"/>
362          <arg line="@{jtregflags}"/>
363          <arg line="${jtreg.flags}"/>
364          <jtreg-elements/>
365        </jtreg>
366        </sequential>
367      </macrodef>
368    
369    <!-- ALoops classpath -->    <!-- ALoops classpath -->
370    <path id="loops.classpath">    <path id="loops.classpath">
# Line 168  Line 372 
372    </path>    </path>
373    
374    <!-- Support @jls tag, used in jdk8+ javadoc -->    <!-- Support @jls tag, used in jdk8+ javadoc -->
375    <!-- TODO: How do we get &trade to work? -->    <property name="javadoc.jls.cite" value="The Java&amp;trade; Language Specification"/>
   <!--   property name="javadoc.jls.cite" value="The Java&trade; Language Specification" -->  
   <property name="javadoc.jls.cite" value="The Java Language Specification"/>  
376    <property name="javadoc.jls.option" value="jls:a:See &lt;cite&gt;${javadoc.jls.cite}&lt;/cite&gt;:"/>    <property name="javadoc.jls.option" value="jls:a:See &lt;cite&gt;${javadoc.jls.cite}&lt;/cite&gt;:"/>
377    
378    <!-- Main targets -->    <!-- Main targets -->
379    
380      <property name="build.main.java.version" value="9"/>
381      <!-- Workaround "no nested properties in ant" -->
382      <macrodef name="define-build-main-properties">
383        <attribute name="v"/>
384        <sequential>
385          <property name="build.main.java"    value="${java@{v}}"/>
386          <property name="build.main.javac"   value="${javac@{v}}"/>
387          <property name="build.main.javadoc" value="${javadoc@{v}}"/>
388        </sequential>
389      </macrodef>
390      <define-build-main-properties v="${build.main.java.version}"/>
391    
392    <target name="dists"    <target name="dists"
393            depends="dist, jsr166xdist, jsr166ydist,jsr166edist,  extra166ydist"            depends="dist, 4jdk8dist"
394            description="Builds all public jars and docs"/>            description="Builds all public jars and docs"/>
395              <!--
396                  depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"
397              -->
398    
399    <target name="compile"    <target name="compile"
400            depends="configure-compiler"            depends="configure-compiler"
401            description="Compiles src/main sources to build folder">            description="Compiles src/main sources to build dir">
402    
403        <local name="destdir"/>
404        <property name="destdir" value="${build.classes.dir}/java.base"/>
405    
406      <mkdir dir="${build.classes.dir}"/>      <mkdir dir="${destdir}"/>
407    
408      <javac srcdir="${src.dir}"      <javac srcdir="${src.dir}"
409             destdir="${build.classes.dir}"             destdir="${destdir}"
410             debug="${build.debug}"             debug="${build.debug}"
411             debuglevel="${build.debuglevel}"             debuglevel="${build.debuglevel}"
412             deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
413             classpath=""             classpath=""
414             includeAntRuntime="false"             includeAntRuntime="false"
415             includeJavaRuntime="false"             includeJavaRuntime="false"
416             executable="${javac8}"             encoding="ASCII"
417               executable="${build.main.javac}"
418             fork="true">             fork="true">
419    
420        <include name="**/*.java"/>        <include name="**/*.java"/>
421        <compilerarg line="${build.args}"/>        <compilerarg value="--patch-module=java.base=${src.dir}"/>
422          <compilerarg value="-Xprefer:source"/>
423        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
424        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
425          <compilerarg line="--doclint-format html5"/>
426  <!--        <compilerarg value="-Xdoclint:all/protected,reference/private"/>
427        <exclude name="java/lang/**"/>        <compilerarg value="-Werror"/>
428          <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
429        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
       <compilerarg line="-Xlint -Xmaxwarns 1000"/>  
 -->  
430    
431      </javac>      </javac>
   
432    </target>    </target>
433    
434    
   
435    <target name="jar"    <target name="jar"
436            depends="compile"            depends="compile"
437            description="Builds library jar from compiled sources">            description="Builds library jar for src/main from compiled sources">
438        <local name="subdir"/>
439      <mkdir dir="${build.lib.dir}"/>      <available property="subdir" file="${build.classes.dir}/java.base" type="dir" value="/java.base"/>
   
440      <jar destfile="${product.jar}">      <jar destfile="${product.jar}">
441        <fileset dir="${build.classes.dir}"/>        <fileset dir="${build.classes.dir}${subdir}"/>
442          <manifest>
443            <attribute name="Built-By" value="${user.name}"/>
444            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
445          </manifest>
446      </jar>      </jar>
   
447    </target>    </target>
448    
449    
   
   <target name="test"  
           depends="init, configure-tests, report-tests"  
           description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />  
   
   
   
450    <target name="docs"    <target name="docs"
451            description="Builds javadocs for src/main">            description="Builds javadocs for src/main to dist dir">
452    
453      <delete dir="${dist.javadocs.dir}"/>      <delete dir="${docs.dir}"/>
454      <mkdir dir="${dist.javadocs.dir}"/>      <mkdir dir="${docs.dir}"/>
455    
456      <!-- the packagenames="none" hack below prevents scanning the -->      <!-- the packagenames="none" hack below prevents scanning the -->
457      <!-- sourcepath for packages -->      <!-- sourcepath for packages -->
458    
459      <javadoc destdir="${dist.javadocs.dir}"  <!-- TODO: sourcepath="${src.dir}:${jdk9.src.dir}" -->
460    <!-- TODO: sourcepath="${src.dir}:${jdk9.src.dir}:${jdk9.src.home}/jdk/src/java.logging/share/classes" -->
461    <!-- TODO: sourcepath="${src.dir}:${jdk9.home}/src.zip" -->
462    <!-- TODO: <arg line="-sourcepath ${src.dir}:${jdk9.home}/src.zip"/> -->
463    <!-- TODO: <arg line="- -module-source-path ${jdk9.home}/src.zip"/> -->
464        <javadoc destdir="${docs.dir}"
465               packagenames="none"               packagenames="none"
466               link="${jdkapi8docs.url}"               link="${java9.api.url}"
467               overview="${src.dir}/intro.html"               overview="${src.dir}/intro.html"
468               sourcepath="${src.dir}:${jdk8src.dir}"               access="${build.javadoc.access}"
469                 sourcepath="${src.dir}"
470               classpath=""               classpath=""
471               executable="${javadoc8}">               source="9"
472        <arg value="-XDignore.symbol.file=true"/>               executable="${build.main.javadoc}">
       <arg value="-tag"/>  
       <arg value="${javadoc.jls.option}"/>  
473        <fileset dir="${src.dir}" defaultexcludes="yes">        <fileset dir="${src.dir}" defaultexcludes="yes">
474          <include name="**/*.java"/>          <include name="**/*.java"/>
475        </fileset>        </fileset>
476          <arg line="-Xdocrootparent ${java9.docroot.url}"/>
477          <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
478          <arg value="-XDignore.symbol.file=true"/>
479          <arg value="-html5"/>
480          <arg value="--patch-module=java.base=${src.dir}"/>
481          <arg value="-tag"/>
482          <arg value="${javadoc.jls.option}"/>
483    <!-- @apiNote currently unused -->
484    <!--       <arg value="-tag"/> -->
485    <!--       <arg value="apiNote:a:API Note:"/> -->
486          <arg value="-tag"/>
487          <arg value="implSpec:a:Implementation Requirements:"/>
488          <arg value="-tag"/>
489          <arg value="implNote:a:Implementation Note:"/>
490    <!-- tags added in jdk9: currently unused -->
491    <!--       <arg value="-tag"/> -->
492    <!--       <arg value="revised:X"/> -->
493    <!--       <arg value="-tag"/> -->
494    <!--       <arg value="spec:X"/> -->
495      </javadoc>      </javadoc>
   
496    </target>    </target>
497    
498    
   
499    <target name="dist"    <target name="dist"
500            depends="init, dist-clean, dist-jar, docs"            depends="dist-clean, dist-jar, dist-docs"
501            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
502    
503    
# Line 280  Line 515 
515        <exclude name="src/emulation/**"/>        <exclude name="src/emulation/**"/>
516        <exclude name="**/SyntaxTest.java"/>        <exclude name="**/SyntaxTest.java"/>
517        <exclude name="**/SuperfluousAbstract.java"/>        <exclude name="**/SuperfluousAbstract.java"/>
518          <manifest>
519            <attribute name="Built-By" value="${user.name}"/>
520            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
521          </manifest>
522      </jar>      </jar>
   
523    </target>    </target>
524    
525    
   
526    <target name="clean"    <target name="clean"
527            description="Removes all build products">            description="Removes all build products">
   
528      <delete dir="${build.dir}"/>      <delete dir="${build.dir}"/>
     <delete dir="${build.classes.dir}"/>  
     <delete dir="${build.lib.dir}"/>  
   
529    </target>    </target>
530    
531    
   
532    <target name="dist-clean"    <target name="dist-clean"
533            description="Removes all build and distribution products">            description="Removes all build and distribution products">
534        <delete dir="${build.dir}"/>
535      <delete dir="${dist.dir}"/>      <delete dir="${dist.dir}"/>
   
   </target>  
   
   
   
   <!-- Internal targets -->  
   
   
   <target name="init">  
   
     <!-- Version is kept in a separate file -->  
     <loadfile property="version" srcFile="version.properties"/>  
     <echo>Building JSR-166 version ${version}</echo>  
     <echo>java.home is ${java.home}</echo>  
   
536    </target>    </target>
537    
538    
539    <target name="dist-jar"    <target name="dist-jar"
540            depends="clean, jar">            depends="clean, jar">
   
541      <copy file="${product.jar}" todir="${dist.dir}"/>      <copy file="${product.jar}" todir="${dist.dir}"/>
   
542    </target>    </target>
543    
544      <target name="dist-docs"
545    <target name="compile-tests"            depends="clean, docs">
546            depends="jar">      <mirror-dir src="${docs.dir}" dst="${dist.docs.dir}"/>
   
     <mkdir dir="${build.testcases.dir}"/>  
   
     <javac srcdir="${tck.src.dir}"  
           destdir="${build.testcases.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${build.sourcelevel}"  
              fork="true">  
   
       <compilerarg value="${bootclasspath.args}"/>  
       <compilerarg line="${build.args}"/>  
       <compilerarg value="-XDignore.symbol.file=true"/>  
   
       <classpath refid="test.classpath"/>  
   
     </javac>  
   
     <javac srcdir="${test.src.dir}"  
           destdir="${build.testcases.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${build.sourcelevel}"  
              fork="true">  
   
       <include name="jsr166/test/**"/>  
   
       <compilerarg value="${bootclasspath.args}"/>  
       <compilerarg line="${build.args}"/>  
       <compilerarg value="-XDignore.symbol.file=true"/>  
   
       <classpath refid="test.classpath"/>  
   
     </javac>  
   
 <!--  
     <javac srcdir="${jtreg.src.dir}"  
           destdir="${build.testcases.dir}"  
             debug="${build.debug}"  
        debuglevel="${build.debuglevel}"  
       deprecation="${build.deprecation}"  
            source="${build.sourcelevel}"  
              fork="true">  
   
       <compilerarg value="${bootclasspath.args}"/>  
       <compilerarg line="${build.args}"/>  
       <compilerarg value="-XDignore.symbol.file=true"/>  
   
       <classpath refid="test.classpath"/>  
   
     </javac>  
 -->  
   
547    </target>    </target>
548    
549      <target name="tck"
550              depends="jar"
551              description="Runs tck tests for src/main directly">
552    
553    <target name="run-tests"      <run-tck-tests
554            depends="compile-tests">        target="${build.main.java.version}"
555          workdir="${build.dir}"
556      <!-- May be overridden by user.properties -->        classes="${product.jar}">
557      <property name="testcase" value="*"/>        <javac-elements>
558            <compilerarg value="-Werror"/>
559      <mkdir dir="${build.reports.dir}"/>        </javac-elements>
560        </run-tck-tests>
561      </target>
562    
563      <target name="tck-parallelism-1"
564              description="Runs tck with common pool parallelism 1">
565        <antcall target="tck">
566          <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="1"/>
567        </antcall>
568      </target>
569    
570      <target name="tck-parallelism-0"
571              description="Runs tck with common pool parallelism 0">
572        <antcall target="tck">
573          <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="0"/>
574        </antcall>
575      </target>
576    
577      <target name="tck-security-manager"
578              description="Runs tck with a security manager">
579        <antcall target="tck">
580          <param name="jsr166.useSecurityManager" value="true"/>
581        </antcall>
582      </target>
583    
584      <target name="jtreg"
585              depends="jar"
586              description="Runs jtreg tests for src/main using the jtreg ant task">
587        <run-jtreg-tests
588           target="${build.main.java.version}"
589           workdir="${build.dir}"
590           classes="${product.jar}"/>
591      </target>
592    
593      <junit printsummary="true"    <target name="test"
594               showoutput="true"            depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"
595            errorProperty="junit.failed"            description="Runs tck and jtreg tests for src/main"/>
         failureProperty="junit.failed"  
                     dir="${build.reports.dir}"  
                    fork="true">  
596    
597        <jvmarg value="${bootclasspath.args}"/>  <!--   <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->
       <jvmarg value="-server"/>  
       <jvmarg value="-showversion"/>  
598    
599        <classpath refid="test.classpath"/>  <!--     <antcall target="jtreg"> -->
600    <!--       <param name="build.main.java.version" value="8"/> -->
601    <!--       <param name="build.main.javac" value="${javac8}"/> -->
602    <!--     </antcall> -->
603    
604        <formatter type="xml"/>  <!--   </target> -->
605    
606        <batchtest todir="${build.reports.dir}" unless="no.test.tck">    <target name="test910"
607          <fileset dir="${tck.src.dir}">            description="Runs tck and jtreg tests for src/main for multiple java versions">
           <include name="**/${testcase}Test.java"/>  
         </fileset>  
       </batchtest>  
608    
609        <batchtest todir="${build.reports.dir}" if="do.test.old">      <antcall target="clean"/>
610          <fileset dir="${test.src.dir}">      <antcall target="test">
611            <include name="jsr166/test/**/${testcase}Test.java"/>        <param name="build.main.java.version" value="9"/>
612          </fileset>      </antcall>
       </batchtest>  
613    
614  <!--      <antcall target="clean"/>
615        <batchtest todir="${build.reports.dir}" if="do.test.jtreg">      <antcall target="test">
616          <fileset dir="${jtreg.src.dir}">        <param name="build.main.java.version" value="10"/>
617            <include name="**/${testcase}Test.java"/>      </antcall>
         </fileset>  
       </batchtest>  
 -->  
618    
619      </junit>      <!-- Clean up to avoid obscure wrong class file version bugs -->
620        <antcall target="clean"/>
621    
622    </target>    </target>
623    
624    
   <target name="report-tests"  
           depends="run-tests">  
   
     <!-- Sets junit.report.format to frames if redirection is present,  
          otherwise sets it to noframes. -->  
     <available property="junit.report.format"  
                   value="frames"  
               classname="org.apache.xalan.lib.Redirect"  
     />  
     <property name="junit.report.format" value="noframes"/>  
   
     <junitreport todir="${build.reports.dir}">  
       <fileset dir="${build.reports.dir}">  
         <include name="TEST-*.xml"/>  
       </fileset>  
       <report format="${junit.report.format}" todir="${build.reports.dir}"  
       />  
     </junitreport>  
   
     <fail message="Test Cases Failed" if="junit.failed"/>  
   
   </target>  
   
625    
626    <target name="configure-compiler">    <target name="configure-compiler">
627        <fail message="ant version too old">
628          <condition> <not> <antversion atleast="1.9.1"/> </not> </condition>
629        </fail>
630    
631      <property name="unchecked.option" value="-Xlint:unchecked"/>      <property name="unchecked.option" value="-Xlint:unchecked"/>
632    
# Line 476  Line 643 
643    </target>    </target>
644    
645    
   <target name="configure-tests"  
        depends="configure-compiler">  
   
     <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->  
     <available property="junit.available"  
                classname="junit.framework.Protectable"/>  
   
     <!-- Xalan -->  
     <available property="xalan.available"  
                classname="org.apache.xalan.Version"/>  
   
   
     <!-- Ant 1.6beta and later don't need or want this check -->  
     <!--  
     <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"  
           unless="junit.available"/>  
   
     <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"  
           unless="xalan.available"/>  
     -->  
   
   </target>  
   
646    
647    <!-- Various demos and test programs -->    <!-- Various demos and test programs -->
648    
649    
650    <target name="loops" depends="init, configure-compiler"    <!-- description="Benchmark from Doug Lea's AQS paper" -->
651            description="Benchmark from Doug Lea's AQS paper">    <target name="loops" depends="configure-compiler">
652    
653      <mkdir dir="${build.loops.dir}"/>      <mkdir dir="${build.loops.dir}"/>
654    
# Line 514  Line 658 
658         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
659        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
660             source="${build.sourcelevel}"             source="${build.sourcelevel}"
661               target="${build.sourcelevel}"
662             encoding="ASCII"
663               fork="true">               fork="true">
664    
665        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
# Line 525  Line 671 
671      <java classname="ALoops" fork="true">      <java classname="ALoops" fork="true">
672        <classpath refid="loops.classpath"/>        <classpath refid="loops.classpath"/>
673      </java>      </java>
   
674    </target>    </target>
675    
676    
677    <!-- jsr166 4jdk7 -->    <target name="compile-test-loops" depends="jar"
678              description="Compiles all the perf tests in src/test/loops">
679    
680        <mkdir dir="${build.dir}/test/loops"/>
681    
682        <javac srcdir="${basedir}/src/test/loops"
683               destdir="${build.dir}/test/loops"
684               debug="${build.debug}"
685               debuglevel="${build.debuglevel}"
686               deprecation="${build.deprecation}"
687               includeAntRuntime="false"
688               includeJavaRuntime="false"
689               encoding="ASCII"
690               executable="${build.main.javac}"
691               fork="true">
692    
693          <include name="*.java"/>
694          <compilerarg value="-XDignore.symbol.file=true"/>
695          <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
696          <compilerarg value="-Xbootclasspath/p:${product.jar}"/>
697          <compilerarg line="${build.args}"/>
698        </javac>
699      </target>
700    
701    
702      <!-- jsr166 4jdk8 -->
703    
704    <target name="4jdk7compile"    <target name="4jdk8compile"
705            depends="configure-compiler"            depends="configure-compiler"
706            description="Compiles src/jdk7 sources, targeting jdk7">            description="Compiles src/jdk8 sources, targeting jdk8">
707    
708      <mkdir dir="${build.4jdk7.classes.dir}"/>      <mkdir dir="${build.4jdk8.classes.dir}"/>
709    
710      <javac srcdir="${4jdk7src.dir}"      <javac srcdir="${4jdk8src.dir}"
711             destdir="${build.4jdk7.classes.dir}"             destdir="${build.4jdk8.classes.dir}"
712             debug="${build.debug}"             debug="${build.debug}"
713             debuglevel="${build.debuglevel}"             debuglevel="${build.debuglevel}"
714             deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
715             source="1.6"             source="8"
716               target="8"
717             classpath=""             classpath=""
718             bootclasspath="${bootclasspath6}"             bootclasspath="${bootclasspath8}"
719             includeAntRuntime="false"             includeAntRuntime="false"
720             includeJavaRuntime="false"             includeJavaRuntime="false"
721             executable="${javac7}"             encoding="ASCII"
722               executable="${javac8}"
723             fork="true">             fork="true">
   
724        <include name="**/*.java"/>        <include name="**/*.java"/>
725        <compilerarg line="${build.args}"/>        <compilerarg value="-Xprefer:source"/>
726        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
727        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
728          <compilerarg value="-Werror"/>
729          <compilerarg line="${build.args}"/>
730      </javac>      </javac>
731      </target>
732    
733      <mkdir dir="${build.4jdk7.lib.dir}"/>    <target name="4jdk8doclint"
734              depends="configure-compiler"
735      <jar destfile="${4jdk7product.jar}" index="true">            description="Finds doclint warnings">
       <fileset dir="${build.4jdk7.classes.dir}"/>  
     </jar>  
736    
737      <mkdir dir="${build.4jdk7.tck.classes.dir}"/>      <mkdir dir="${build.4jdk8.classes.dir}"/>
738    
739      <javac srcdir="${tck.src.dir}"      <javac srcdir="${4jdk8src.dir}"
740             destdir="${build.4jdk7.tck.classes.dir}"             destdir="${build.4jdk8.classes.dir}"
741             debug="${build.debug}"             debug="${build.debug}"
742             debuglevel="${build.debuglevel}"             debuglevel="${build.debuglevel}"
743             deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
744             source="1.6"             source="8"
745             classpath="${junit.jar}"             target="8"
746             bootclasspath="${4jdk7product.jar}:${bootclasspath6}"             classpath=""
747               bootclasspath="${bootclasspath8}"
748             includeAntRuntime="false"             includeAntRuntime="false"
749             includeJavaRuntime="false"             includeJavaRuntime="false"
750             executable="${javac7}"             encoding="ASCII"
751               executable="${javac8}"
752             fork="true">             fork="true">
   
753        <include name="**/*.java"/>        <include name="**/*.java"/>
754        <compilerarg line="${build.args}"/>        <compilerarg value="-Xprefer:source"/>
755        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
756        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>        <compilerarg value="-Xlint:all"/>
757          <compilerarg value="-Xdoclint:all/protected,reference/private"/>
758          <compilerarg line="${build.args}"/>
759      </javac>      </javac>
760      </target>
761    
762    
763      <target name="4jdk8jar"
764              depends="4jdk8compile"
765              description="Builds library jar from compiled sources">
766    
767        <jar destfile="${4jdk8product.jar}">
768          <fileset dir="${build.4jdk8.classes.dir}"/>
769          <manifest>
770            <attribute name="Built-By" value="${user.name}"/>
771            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
772          </manifest>
773        </jar>
774    </target>    </target>
775    
776    
777    <target name="4jdk7-test-tck"    <target name="4jdk8-tck"
778            depends="4jdk7compile"            depends="4jdk8jar"
779            description="Runs tck tests for jsr166-4jdk7 directly">            description="Runs tck tests for jsr166-4jdk8 directly">
780    
781      <run-tck-tests      <run-tck-tests
782        jvm="${java7}"        target="8"
783        tck.classes="${build.4jdk7.tck.classes.dir}"        workdir="${build.4jdk8.dir}"
784        product.jar="${4jdk7product.jar}"/>        classes="${4jdk8product.jar}">
785          <javac-elements>
786            <!-- JDK9+ test classes -->
787            <exclude name="*9Test.java"/>
788            <exclude name="*10Test.java"/>
789            <compilerarg value="-Werror"/>
790          </javac-elements>
791        </run-tck-tests>
792    </target>    </target>
793    
794    
795    <target name="4jdk7-test-tck-junit"    <target name="4jdk8-jtreg"
796            depends="4jdk7compile"            depends="4jdk8jar"
797            description="Runs tck tests for jsr166-4jdk7 via junit task (experimental)">            description="Runs jtreg tests for jsr166-4jdk8 using the jtreg ant task">
798        <run-jtreg-tests
799           target="8"
800           workdir="${build.4jdk8.dir}"
801           classes="${4jdk8product.jar}"/>
802      </target>
803    
     <junit printsummary="true"  
            showoutput="true"  
            errorProperty="junit.failed"  
            failureProperty="junit.failed"  
            includeantruntime="true"  
            jvm="${java7}"  
            fork="true">  
   
       <jvmarg value="-Xbootclasspath/p:${4jdk7product.jar}"/>  
       <jvmarg value="-server"/>  
804    
805        <classpath>    <target name="4jdk8-test"
806          <pathelement location="${junit.jar}"/>            depends="4jdk8-tck, 4jdk8-jtreg"
807          <pathelement location="${build.4jdk7.tck.classes.dir}"/>            description="Runs tck and jtreg tests for jsr166-4jdk8"/>
       </classpath>  
   
       <formatter type="brief"/>  
   
       <test name="JSR166TestCase" haltonfailure="no">  
       </test>  
   
     </junit>  
   </target>  
808    
809    
810    <target name="4jdk7docs"    <target name="4jdk8docs"
811            description="Builds javadocs with custom tags to build folder">            description="Builds javadocs for src/jdk8 to dist dir">
812    
813      <delete dir="${build.4jdk7.docs.dir}"/>      <delete dir="${4jdk8docs.dir}"/>
814      <mkdir dir="${build.4jdk7.docs.dir}"/>      <mkdir dir="${4jdk8docs.dir}"/>
815    
816      <javadoc destdir="${build.4jdk7.docs.dir}"      <javadoc destdir="${4jdk8docs.dir}"
817               packagenames="none"               packagenames="none"
818               link="${jdkapi7docs.url}"               link="${java8.api.url}"
819               overview="${4jdk7src.dir}/intro.html"               overview="${4jdk8src.dir}/intro.html"
820               sourcepath="${4jdk7src.dir}:${jdk7src.dir}"               access="${build.javadoc.access}"
821                 sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"
822               classpath=""               classpath=""
823               executable="${javadoc7}">               source="8"
824        <arg value="-XDignore.symbol.file=true"/>               executable="${javadoc8}"
825        <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">               failonerror = "true">
826          <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">
827          <include name="**/*.java"/>          <include name="**/*.java"/>
828        </fileset>        </fileset>
829          <arg line="-Xdocrootparent ${java8.docroot.url}"/>
830          <arg value="-XDignore.symbol.file=true"/>
831          <arg value="-tag"/>
832          <arg value="${javadoc.jls.option}"/>
833    <!-- @apiNote currently unused -->
834    <!--       <arg value="-tag"/> -->
835    <!--       <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/> -->
836          <arg value="-tag"/>
837          <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
838          <arg value="-tag"/>
839          <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
840      </javadoc>      </javadoc>
   
841    </target>    </target>
842    
843    
844    <target name="4jdk7dist"    <target name="4jdk8dist"
845            depends="4jdk7dist-clean, 4jdk7dist-jar, 4jdk7dist-docs"            depends="4jdk8dist-jar, 4jdk8dist-docs"
846            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
847    
848    
849      <target name="4jdk8clean"
850    <target name="4jdk7clean"            description="Removes all 4jdk8 build products">
851            description="Removes all build products">      <delete dir="${build.4jdk8.dir}"/>
   
     <delete dir="${build.4jdk7.dir}"/>  
   
   </target>  
   
   
   
   <target name="4jdk7dist-clean"  
           description="Removes all build and distribution products">  
   
852    </target>    </target>
853    
   <target name="4jdk7dist-docs"  
           description="Builds javadocs without custom tags to dist folder">  
   
     <delete dir="${dist.4jdk7.docs.dir}"/>  
     <mkdir dir="${dist.4jdk7.docs.dir}"/>  
   
     <javadoc destdir="${dist.4jdk7.docs.dir}"  
              packagenames="none"  
              link="${jdkapi7docs.url}"  
              overview="${4jdk7src.dir}/intro.html"  
              sourcepath="${4jdk7src.dir}:${jdk7src.dir}"  
              classpath=""  
              executable="${javadoc7}">  
       <arg value="-XDignore.symbol.file=true"/>  
       <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">  
         <include name="**/*.java"/>  
       </fileset>  
     </javadoc>  
854    
855      <target name="4jdk8dist-jar"
856              depends="4jdk8clean, 4jdk8jar">
857        <copy file="${4jdk8product.jar}" todir="${dist.dir}"/>
858    </target>    </target>
859    
   <target name="4jdk7dist-jar"  
           depends="4jdk7clean, 4jdk7compile">  
   
     <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>  
860    
861      <target name="4jdk8dist-docs"
862              depends="4jdk8clean, 4jdk8docs">
863        <mirror-dir src="${4jdk8docs.dir}" dst="${dist.4jdk8docs.dir}"/>
864    </target>    </target>
865    
   <!-- jsr166x -->  
866    
867      <!-- jsr166 4jdk7 (no longer maintained) -->
868    
869    <target name="jsr166xcompile"    <target name="4jdk7compile" depends="configure-compiler">
870            depends="init, configure-compiler"      <mkdir dir="${build.4jdk7.classes.dir}"/>
           description="Compiles jsr166x sources">  
   
     <mkdir dir="${build.jsr166x.dir}"/>  
871    
872      <javac srcdir="${jsr166xsrc.dir}"      <javac srcdir="${4jdk7src.dir}"
873            destdir="${build.jsr166x.dir}"             destdir="${build.4jdk7.classes.dir}"
874              debug="${build.debug}"              debug="${build.debug}"
875         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
876        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
877             source="${build.sourcelevel}"             source="6"
878               target="6"
879               classpath=""
880               bootclasspath="${bootclasspath6}"
881               includeAntRuntime="false"
882               includeJavaRuntime="false"
883               encoding="ASCII"
884               executable="${javac7}"
885               fork="true">               fork="true">
886    
887        <include name="**/*.java"/>        <include name="**/*.java"/>
888        <compilerarg line="${build.args}"/>        <compilerarg value="-Xprefer:source"/>
889        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
890          <compilerarg value="-Xlint:all"/>
891          <compilerarg value="-Werror"/>
892          <compilerarg line="${build.args}"/>
893      </javac>      </javac>
   
894    </target>    </target>
895    
896      <target name="4jdk7doclint" depends="configure-compiler">
897        <mkdir dir="${build.4jdk7.classes.dir}"/>
898    
899        <javac srcdir="${4jdk7src.dir}"
900               destdir="${build.4jdk7.classes.dir}"
901               debug="${build.debug}"
902               debuglevel="${build.debuglevel}"
903               deprecation="${build.deprecation}"
904               source="6"
905               target="6"
906               classpath=""
907               bootclasspath="${bootclasspath6}"
908               includeAntRuntime="false"
909               includeJavaRuntime="false"
910               encoding="ASCII"
911               executable="${javac8}"
912               fork="true">
913    
914    <target name="jsr166xjar"        <include name="**/*.java"/>
915            depends="jsr166xcompile"        <compilerarg value="-Xprefer:source"/>
916            description="Builds library jar from compiled sources">        <compilerarg value="-XDignore.symbol.file=true"/>
917          <compilerarg value="-Xlint:all"/>
918      <mkdir dir="${build.jsr166xlib.dir}"/>        <compilerarg value="-Xdoclint:all/protected"/>
919          <compilerarg line="${build.args}"/>
920        </javac>
921      </target>
922    
923      <jar destfile="${jsr166xproduct.jar}">    <target name="4jdk7jar" depends="4jdk7compile">
924        <fileset dir="${build.jsr166x.dir}"/>      <jar destfile="${4jdk7product.jar}">
925          <fileset dir="${build.4jdk7.classes.dir}"/>
926          <manifest>
927            <attribute name="Built-By" value="${user.name}"/>
928            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
929          </manifest>
930      </jar>      </jar>
   
931    </target>    </target>
932    
933      <target name="4jdk7-tck" depends="4jdk7jar">
934        <run-tck-tests
935    <target name="jsr166xdocs"        target="7"
936            description="Builds javadocs with custom tags to build folder">        workdir="${build.4jdk7.dir}"
937          classes="${4jdk7product.jar}">
938      <delete dir="${build.jsr166xjavadocs.dir}"/>        <javac-elements>
939      <mkdir dir="${build.jsr166xjavadocs.dir}"/>          <!-- JDK8+ test classes -->
940            <exclude name="*8Test.java"/>
941      <javadoc destdir="${build.jsr166xjavadocs.dir}"          <exclude name="*9Test.java"/>
942               packagenames="jsr166x"          <exclude name="*10Test.java"/>
943               link="${jdkapidocs.url}"          <exclude name="DoubleAccumulatorTest.java"/>
944               source="${build.sourcelevel}"          <exclude name="DoubleAdderTest.java"/>
945               sourcepath="${topsrc.dir}:${jdksrc.dir}"          <exclude name="LongAccumulatorTest.java"/>
946               additionalparam="-XDignore.symbol.file=true" />          <exclude name="LongAdderTest.java"/>
947            <exclude name="CompletableFutureTest.java"/>
948            <exclude name="SplittableRandomTest.java"/>
949            <exclude name="StampedLockTest.java"/>
950            <exclude name="SubmissionPublisherTest.java"/>
951            <compilerarg value="-Werror"/>
952          </javac-elements>
953        </run-tck-tests>
954    </target>    </target>
955    
956      <!-- Runs tck tests for jsr166-4jdk7 via junit task (dead experiment) -->
957      <target name="4jdk7-tck-junit" depends="4jdk7compile">
958    
959    <target name="jsr166xdist"      <junit printsummary="true"
960            depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs"             showoutput="true"
961            description="Puts all distributable products in single hierarchy"/>             errorProperty="junit.failed"
962               failureProperty="junit.failed"
963               includeantruntime="true"
964               jvm="${java7}"
965               fork="true">
966    
967          <jvmarg value="-Xbootclasspath/p:${4jdk7product.jar}"/>
968          <jvmarg value="-server"/>
969    
970    <target name="jsr166xclean"        <classpath>
971            description="Removes all build products">          <pathelement location="${junit.jar}"/>
972            <pathelement location="${build.4jdk7.tck.classes.dir}"/>
973          </classpath>
974    
975      <delete dir="${build.jsr166x.dir}"/>        <formatter type="brief"/>
     <delete dir="${build.jsr166xlib.dir}"/>  
976    
977          <test name="${jsr166.tckTestClass}" haltonfailure="no">
978          </test>
979        </junit>
980    </target>    </target>
981    
982      <target name="4jdk7-jtreg" depends="4jdk7jar">
983        <run-jtreg-tests
984    <target name="jsr166xdist-clean"         target="7"
985            description="Removes all build and distribution products">         workdir="${build.4jdk7.dir}"
986           classes="${4jdk7product.jar}"/>
987    </target>    </target>
988    
989      <target name="4jdk7-test" depends="4jdk7-tck, 4jdk7-jtreg"/>
990    
991      <target name="4jdk7docs">
992        <delete dir="${4jdk7docs.dir}"/>
993        <mkdir dir="${4jdk7docs.dir}"/>
994    
995    <target name="jsr166xdist-docs"      <javadoc destdir="${4jdk7docs.dir}"
996            description="Builds javadocs without custom tags to dist folder">               packagenames="none"
997                 link="${java7.api.url}"
998      <delete dir="${dist.jsr166xjavadocs.dir}"/>               overview="${4jdk7src.dir}/intro.html"
999      <mkdir dir="${dist.jsr166xjavadocs.dir}"/>               access="${build.javadoc.access}"
1000                 sourcepath="${4jdk7src.dir}:${jdk7.src.dir}"
1001      <javadoc destdir="${dist.jsr166xjavadocs.dir}"               classpath=""
1002               packagenames="jsr166x"               executable="${javadoc7}"
1003               link="${jdkapidocs.url}"               failonerror = "true">
1004               source="${build.sourcelevel}"        <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">
1005               sourcepath="${topsrc.dir}:${jdksrc.dir}"          <include name="**/*.java"/>
1006               additionalparam="-XDignore.symbol.file=true" />        </fileset>
1007          <arg line="-Xdocrootparent ${java7.docroot.url}"/>
1008          <arg value="-XDignore.symbol.file=true"/>
1009        </javadoc>
1010    </target>    </target>
1011    
1012    <target name="jsr166xdist-jar"    <target name="4jdk7dist" depends="4jdk7dist-jar, 4jdk7dist-docs"/>
           depends="jsr166xclean, jsr166xjar">  
1013    
1014      <copy file="${jsr166xproduct.jar}" todir="${dist.dir}"/>    <target name="4jdk7clean">
1015        <delete dir="${build.4jdk7.dir}"/>
1016      </target>
1017    
1018      <target name="4jdk7dist-jar" depends="4jdk7clean, 4jdk7jar">
1019        <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>
1020    </target>    </target>
1021    
1022    <!-- jsr166y -->    <target name="4jdk7dist-docs" depends="4jdk7clean, 4jdk7docs">
1023        <mirror-dir src="${4jdk7docs.dir}" dst="${dist.4jdk7docs.dir}"/>
1024      </target>
1025    
1026    
1027    <target name="jsr166ycompile"    <!-- jsr166x (no longer maintained) -->
           depends="init, configure-compiler"  
           description="Compiles jsr166y sources">  
1028    
1029      <mkdir dir="${build.jsr166y.dir}"/>    <target name="jsr166xcompile" depends="configure-compiler">
1030        <mkdir dir="${build.jsr166x.classes.dir}"/>
1031    
1032      <javac srcdir="${jsr166ysrc.dir}"      <javac srcdir="${topsrc.dir}"
1033            destdir="${build.jsr166y.dir}"             destdir="${build.jsr166x.classes.dir}"
1034              debug="${build.debug}"              debug="${build.debug}"
1035         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
1036        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
1037             source="${build.sourcelevel}"             classpath=""
1038               bootclasspath="${bootclasspath6}"
1039               source="5"
1040               target="5"
1041               includeAntRuntime="false"
1042               includeJavaRuntime="false"
1043               encoding="ASCII"
1044               executable="${javac7}"
1045               fork="true">               fork="true">
1046          <include name="jsr166x/**/*.java"/>
       <include name="**/*.java"/>  
       <compilerarg line="${build.args}"/>  
1047        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
1048        <compilerarg value="${bootclasspath.args}"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>
1049          <compilerarg value="-Werror"/>
1050  <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->        <compilerarg line="${build.args}"/>
   
1051      </javac>      </javac>
   
1052    </target>    </target>
1053    
1054      <target name="jsr166xjar" depends="jsr166xcompile">
1055        <jar destfile="${jsr166x.jar}">
1056    <target name="jsr166yjar"        <fileset dir="${build.jsr166x.classes.dir}"/>
1057            depends="jsr166ycompile"        <manifest>
1058            description="Builds library jar from compiled sources">          <attribute name="Built-By" value="${user.name}"/>
1059            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1060      <mkdir dir="${build.jsr166ylib.dir}"/>        </manifest>
   
     <jar destfile="${jsr166yproduct.jar}" index="true">  
       <fileset dir="${build.jsr166y.dir}"/>  
1061      </jar>      </jar>
   
1062    </target>    </target>
1063    
1064      <target name="jsr166xdocs">
1065        <delete dir="${jsr166xdocs.dir}"/>
1066        <mkdir dir="${jsr166xdocs.dir}"/>
1067    
1068        <javadoc destdir="${jsr166xdocs.dir}"
1069                 packagenames="jsr166x.*"
1070                 link="${java.api.url}"
1071                 access="${build.javadoc.access}"
1072                 sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1073                 bootclasspath="${bootclasspath6}"
1074                 source="5"
1075                 executable="${javadoc7}"
1076                 failonerror = "true">
1077          <arg line="-Xdocrootparent ${java.docroot.url}"/>
1078          <arg value="-XDignore.symbol.file=true"/>
1079        </javadoc>
1080      </target>
1081    
1082      <target name="jsr166xdist" depends="jsr166xdist-jar, jsr166xdist-docs"/>
1083    
1084    <target name="jsr166ydocs"    <target name="jsr166xclean">
1085            description="Builds javadocs with custom tags to build folder">      <delete dir="${build.jsr166x.dir}"/>
   
     <delete dir="${build.jsr166yjavadocs.dir}"/>  
     <mkdir dir="${build.jsr166yjavadocs.dir}"/>  
   
     <javadoc destdir="${build.jsr166yjavadocs.dir}"  
              packagenames="jsr166y"  
              link="${jdkapidocs.url}"  
              source="${build.sourcelevel}"  
              sourcepath="${topsrc.dir}:${jdksrc.dir}"  
              additionalparam="-XDignore.symbol.file=true" />  
   
1086    </target>    </target>
1087    
1088      <target name="jsr166xdist-jar" depends="jsr166xclean, jsr166xjar">
1089        <copy file="${jsr166x.jar}" todir="${dist.dir}"/>
1090      </target>
1091    
1092    <target name="jsr166ydist"    <target name="jsr166xdist-docs" depends="jsr166xclean, jsr166xdocs">
1093            depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydist-docs"      <mirror-dir src="${jsr166xdocs.dir}" dst="${dist.jsr166xdocs.dir}"/>
1094            description="Puts all distributable products in single hierarchy"/>    </target>
1095    
1096    
1097      <!-- jsr166y (no longer maintained) -->
1098    
1099    <target name="jsr166yclean"    <target name="jsr166ycompile" depends="configure-compiler">
1100            description="Removes all build products">      <mkdir dir="${build.jsr166y.classes.dir}"/>
1101    
1102      <delete dir="${build.jsr166y.dir}"/>      <javac srcdir="${topsrc.dir}"
1103      <delete dir="${build.jsr166ylib.dir}"/>             destdir="${build.jsr166y.classes.dir}"
1104               debug="${build.debug}"
1105               debuglevel="${build.debuglevel}"
1106               deprecation="${build.deprecation}"
1107               source="6"
1108               target="6"
1109               classpath=""
1110               bootclasspath="${bootclasspath6}"
1111               includeAntRuntime="false"
1112               includeJavaRuntime="false"
1113               encoding="ASCII"
1114               executable="${javac7}"
1115               fork="true">
1116    
1117          <include name="jsr166y/**/*.java"/>
1118          <compilerarg value="-XDignore.symbol.file=true"/>
1119          <compilerarg value="-Xlint:all"/>
1120          <compilerarg value="-Werror"/>
1121          <compilerarg line="${build.args}"/>
1122        </javac>
1123    </target>    </target>
1124    
1125      <target name="jsr166yjar" depends="jsr166ycompile">
1126        <jar destfile="${jsr166y.jar}" index="true">
1127    <target name="jsr166ydist-clean"        <fileset dir="${build.jsr166y.classes.dir}"/>
1128            description="Removes all build and distribution products">        <manifest>
1129            <attribute name="Built-By" value="${user.name}"/>
1130            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1131          </manifest>
1132        </jar>
1133    </target>    </target>
1134    
1135    <target name="jsr166ydist-docs"    <target name="jsr166ydocs">
1136            description="Builds javadocs without custom tags to dist folder">      <delete dir="${jsr166ydocs.dir}"/>
1137        <mkdir dir="${jsr166ydocs.dir}"/>
1138      <delete dir="${dist.jsr166yjavadocs.dir}"/>  
1139      <mkdir dir="${dist.jsr166yjavadocs.dir}"/>      <javadoc destdir="${jsr166ydocs.dir}"
1140                 packagenames="jsr166y.*"
1141      <javadoc destdir="${dist.jsr166yjavadocs.dir}"               link="${java.api.url}"
1142               packagenames="jsr166y"               access="${build.javadoc.access}"
1143               link="${jdkapidocs.url}"               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1144               source="${build.sourcelevel}"               bootclasspath="${bootclasspath6}"
1145               sourcepath="${topsrc.dir}:${jdksrc.dir}"               source="6"
1146               additionalparam="-XDignore.symbol.file=true" />               executable="${javadoc7}"
1147                 failonerror = "true">
1148          <arg line="-Xdocrootparent ${java.docroot.url}"/>
1149          <arg value="-XDignore.symbol.file=true"/>
1150        </javadoc>
1151    </target>    </target>
1152    
1153    <target name="jsr166ydist-jar"    <target name="jsr166ydist" depends="jsr166ydist-jar, jsr166ydist-docs"/>
           depends="jsr166yclean, jsr166yjar">  
   
     <copy file="${jsr166yproduct.jar}" todir="${dist.dir}"/>  
1154    
1155      <target name="jsr166yclean">
1156        <delete dir="${build.jsr166y.dir}"/>
1157    </target>    </target>
1158    
1159      <target name="jsr166ydist-jar" depends="jsr166yclean, jsr166yjar">
1160        <copy file="${jsr166y.jar}" todir="${dist.dir}"/>
1161      </target>
1162    
1163    <!-- extra166y -->    <target name="jsr166ydist-docs" depends="jsr166yclean, jsr166ydocs">
1164        <mirror-dir src="${jsr166ydocs.dir}" dst="${dist.jsr166ydocs.dir}"/>
1165      </target>
1166    
1167    
1168    <target name="extra166ycompile"    <!-- extra166y (no longer maintained) -->
           depends="init, configure-compiler, jsr166ycompile"  
           description="Compiles extra166y sources">  
1169    
1170      <mkdir dir="${build.extra166y.dir}"/>    <target name="extra166ycompile" depends="configure-compiler, jsr166yjar">
1171        <mkdir dir="${build.extra166y.classes.dir}"/>
1172    
1173      <javac srcdir="${extra166ysrc.dir}"      <javac srcdir="${topsrc.dir}"
1174            destdir="${build.extra166y.dir}"             destdir="${build.extra166y.classes.dir}"
1175              debug="${build.debug}"              debug="${build.debug}"
             classpath="${jsr166yproduct.jar}"  
1176         debuglevel="${build.debuglevel}"         debuglevel="${build.debuglevel}"
1177        deprecation="${build.deprecation}"        deprecation="${build.deprecation}"
1178             source="${build.sourcelevel}"             bootclasspath="@{jsr166y.jar}:${bootclasspath6}"
1179               classpath=""
1180               source="6"
1181               target="6"
1182               includeAntRuntime="false"
1183               includeJavaRuntime="false"
1184               encoding="ASCII"
1185               executable="${javac7}"
1186               fork="true">               fork="true">
1187    
1188        <include name="**/*.java"/>        <include name="extra166y/**/*.java"/>
       <compilerarg line="${build.args}"/>  
1189        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
1190        <compilerarg value="${bootclasspath.args}"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
1191          <compilerarg value="-Werror"/>
1192  <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->        <compilerarg line="${build.args}"/>
   
1193      </javac>      </javac>
   
1194    </target>    </target>
1195    
1196      <target name="extra166yjar" depends="extra166ycompile">
1197        <jar destfile="${extra166y.jar}" index="true">
1198    <target name="extra166yjar"        <fileset dir="${build.extra166y.classes.dir}"/>
1199            depends="extra166ycompile"        <manifest>
1200            description="Builds library jar from compiled sources">          <attribute name="Built-By" value="${user.name}"/>
1201            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1202      <mkdir dir="${build.extra166ylib.dir}"/>        </manifest>
   
     <jar destfile="${extra166yproduct.jar}" index="true">  
       <fileset dir="${build.extra166y.dir}"/>  
1203      </jar>      </jar>
   
1204    </target>    </target>
1205    
1206      <target name="extra166ydocs">
1207        <delete dir="${extra166ydocs.dir}"/>
1208    <target name="extra166ydocs"      <mkdir dir="${extra166ydocs.dir}"/>
1209            description="Builds javadocs with custom tags to build folder">  
1210        <javadoc destdir="${extra166ydocs.dir}"
1211      <delete dir="${build.extra166yjavadocs.dir}"/>               packagenames="extra166y.*"
1212      <mkdir dir="${build.extra166yjavadocs.dir}"/>               link="${java.api.url}"
1213                 access="${build.javadoc.access}"
1214      <javadoc destdir="${build.extra166yjavadocs.dir}"               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1215               packagenames="extra166y"               bootclasspath="${bootclasspath6}"
1216               link="${jdkapidocs.url}"               source="6"
1217               source="${build.sourcelevel}"               executable="${javadoc7}">
1218               sourcepath="${topsrc.dir}:${jdksrc.dir}"        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1219               additionalparam="-XDignore.symbol.file=true" />        <arg value="-XDignore.symbol.file=true"/>
1220        </javadoc>
1221    </target>    </target>
1222    
1223      <target name="extra166ydist" depends="extra166ydist-jar, extra166ydist-docs"/>
1224    
1225    <target name="extra166ydist"    <target name="extra166yclean">
           depends="extra166ydist-clean, extra166ydist-jar, extra166ydist-docs"  
           description="Puts all distributable products in single hierarchy"/>  
   
   
   
   <target name="extra166yclean"  
           description="Removes all build products">  
   
1226      <delete dir="${build.extra166y.dir}"/>      <delete dir="${build.extra166y.dir}"/>
     <delete dir="${build.extra166ylib.dir}"/>  
   
1227    </target>    </target>
1228    
1229      <target name="extra166ydist-jar" depends="extra166yclean, extra166yjar">
1230        <copy file="${extra166y.jar}" todir="${dist.dir}"/>
   <target name="extra166ydist-clean"  
           description="Removes all build and distribution products">  
   
1231    </target>    </target>
1232    
1233    <target name="extra166ydist-docs"    <target name="extra166ydist-docs" depends="extra166yclean, extra166ydocs">
1234            description="Builds javadocs without custom tags to dist folder">      <mirror-dir src="${extra166ydocs.dir}" dst="${dist.extra166ydocs.dir}"/>
   
     <delete dir="${dist.extra166yjavadocs.dir}"/>  
     <mkdir dir="${dist.extra166yjavadocs.dir}"/>  
   
     <javadoc destdir="${dist.extra166yjavadocs.dir}"  
              packagenames="extra166y"  
              link="${jdkapidocs.url}"  
              source="${build.sourcelevel}"  
              sourcepath="${topsrc.dir}:${jdksrc.dir}"  
              additionalparam="-XDignore.symbol.file=true" />  
   
1235    </target>    </target>
1236    
   <target name="extra166ydist-jar"  
           depends="extra166yclean, extra166yjar">  
   
     <copy file="${extra166yproduct.jar}" todir="${dist.dir}"/>  
1237    
1238    </target>    <!-- jsr166e (no longer maintained) -->
   
   <!-- jsr166e -->  
1239    
1240    <target name="jsr166ecompile"    <property name="build.jsr166e.java.version" value="6"/>
1241            depends="configure-compiler"    <property name="build.jsr166e.javac" value="${javac6}"/>
           description="Compiles jsr166e sources">  
1242    
1243      <mkdir dir="${build.jsr166e.dir}"/>    <target name="jsr166ecompile" depends="configure-compiler">
1244        <mkdir dir="${build.jsr166e.classes.dir}"/>
1245    
1246      <javac srcdir="${topsrc.dir}"      <javac srcdir="${topsrc.dir}"
1247             destdir="${build.jsr166e.dir}"             destdir="${build.jsr166e.classes.dir}"
1248             debug="${build.debug}"             debug="${build.debug}"
1249             debuglevel="${build.debuglevel}"             debuglevel="${build.debuglevel}"
1250             deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
1251             source="1.7"             source="${build.jsr166e.java.version}"
1252               target="${build.jsr166e.java.version}"
1253             classpath=""             classpath=""
1254             includeAntRuntime="false"             includeAntRuntime="false"
1255             includeJavaRuntime="false"             includeJavaRuntime="false"
1256             executable="${javac7}"             executable="${build.jsr166e.javac}"
1257             fork="true">             fork="true">
1258    
1259        <include name="jsr166e/**/*.java"/>        <include name="jsr166e/**/*.java"/>
       <compilerarg line="${build.args}"/>  
1260        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
1261        <compilerarg value="-Xlint:all"/>        <compilerarg value="-Xlint:all"/>
1262          <compilerarg value="-Werror"/>
1263          <compilerarg line="${build.args}"/>
1264      </javac>      </javac>
   
1265    </target>    </target>
1266    
1267      <target name="jsr166edoclint">
1268        <mkdir dir="${build.jsr166e.classes.dir}"/>
1269    
1270        <javac srcdir="${topsrc.dir}"
1271               destdir="${build.jsr166e.classes.dir}"
1272               debug="${build.debug}"
1273               debuglevel="${build.debuglevel}"
1274               deprecation="${build.deprecation}"
1275               source="${build.jsr166e.java.version}"
1276               target="${build.jsr166e.java.version}"
1277               classpath=""
1278               bootclasspath="${bootclasspath6}"
1279               includeAntRuntime="false"
1280               includeJavaRuntime="false"
1281               executable="${javac8}"
1282               fork="true">
1283    
1284    <target name="jsr166ejar"        <include name="jsr166e/**/*.java"/>
1285            depends="jsr166ecompile"        <compilerarg value="-XDignore.symbol.file=true"/>
1286            description="Builds library jar from compiled sources">        <compilerarg value="-Xlint:all"/>
1287          <compilerarg value="-Werror"/>
1288      <mkdir dir="${build.jsr166elib.dir}"/>        <compilerarg value="-Xdoclint:all/protected"/>
1289        </javac>
1290      </target>
1291    
1292      <jar destfile="${jsr166eproduct.jar}" index="true">    <target name="jsr166ejar" depends="jsr166ecompile">
1293        <fileset dir="${build.jsr166e.dir}"/>      <jar destfile="${jsr166e.jar}" index="true">
1294          <fileset dir="${build.jsr166e.classes.dir}"/>
1295          <manifest>
1296            <attribute name="Built-By" value="${user.name}"/>
1297            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1298          </manifest>
1299      </jar>      </jar>
   
1300    </target>    </target>
1301    
1302      <target name="jsr166edocs">
1303        <delete dir="${jsr166edocs.dir}"/>
1304    <target name="jsr166edocs"      <mkdir dir="${jsr166edocs.dir}"/>
1305            description="Builds javadocs with custom tags to build folder">  
1306        <javadoc destdir="${jsr166edocs.dir}"
1307      <delete dir="${build.jsr166ejavadocs.dir}"/>               packagenames="jsr166e.*"
1308      <mkdir dir="${build.jsr166ejavadocs.dir}"/>               link="${java.api.url}"
1309                 access="${build.javadoc.access}"
1310      <javadoc destdir="${build.jsr166ejavadocs.dir}"               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1311               packagenames="jsr166e,jsr166e.extra"               source="${build.jsr166e.java.version}"
              link="${jdkapi7docs.url}"  
              source="1.7"  
              sourcepath="${topsrc.dir}:${jdk7src.dir}"  
1312               executable="${javadoc7}"               executable="${javadoc7}"
1313               additionalparam="-XDignore.symbol.file=true" >               failonerror = "true">
1314        <fileset dir="${topsrc.dir}" defaultexcludes="yes">        <arg line="-Xdocrootparent ${java.docroot.url}"/>
1315          <include name="jsr166e/**/*.java"/>        <arg value="-XDignore.symbol.file=true"/>
       </fileset>  
1316      </javadoc>      </javadoc>
1317      </target>
1318    
1319      <target name="jsr166e-tck-one-java-version" depends="jsr166ejar">
1320        <echo message="Testing with jdk${build.jsr166e.java.version} ..."/>
1321        <run-tck-tests
1322          tck.src.dir="${test.src.dir}/tck-jsr166e"
1323          target="${build.jsr166e.java.version}"
1324          workdir="${build.jsr166e.dir}"
1325          classes="${jsr166e.jar}"/>
1326    </target>    </target>
1327    
1328      <target name="jsr166e-tck">
1329    
1330    <target name="jsr166edist"  <!--     <antcall target="clean"/> -->
1331            depends="jsr166edist-clean, jsr166edist-jar, jsr166edist-docs"  <!--     <antcall target="jsr166e-tck-one-java-version"> -->
1332            description="Puts all distributable products in single hierarchy"/>  <!--       <param name="build.jsr166e.java.version" value="8"/> -->
1333    <!--       <param name="build.jsr166e.javac" value="${javac8}"/> -->
1334    <!--     </antcall> -->
1335    
1336        <antcall target="clean"/>
1337        <antcall target="jsr166e-tck-one-java-version">
1338          <param name="build.jsr166e.java.version" value="7"/>
1339          <param name="build.jsr166e.javac" value="${javac7}"/>
1340        </antcall>
1341    
1342        <antcall target="clean"/>
1343        <antcall target="jsr166e-tck-one-java-version">
1344          <param name="build.jsr166e.java.version" value="6"/>
1345          <param name="build.jsr166e.javac" value="${javac6}"/>
1346        </antcall>
1347      </target>
1348    
1349    <target name="jsr166eclean"    <target name="jsr166e-test" depends="jsr166e-tck"/>
           description="Removes all build products">  
1350    
1351      <target name="jsr166edist" depends="jsr166edist-jar, jsr166edist-docs"/>
1352    
1353      <target name="jsr166eclean">
1354      <delete dir="${build.jsr166e.dir}"/>      <delete dir="${build.jsr166e.dir}"/>
1355      <delete dir="${build.jsr166elib.dir}"/>    </target>
1356    
1357      <target name="jsr166edist-jar"
1358              depends="jsr166eclean, jsr166ejar">
1359        <copy file="${jsr166e.jar}" todir="${dist.dir}"/>
1360    </target>    </target>
1361    
1362      <target name="jsr166edist-docs" depends="jsr166eclean, jsr166edocs">
1363        <mirror-dir src="${jsr166edocs.dir}" dst="${dist.jsr166edocs.dir}"/>
1364      </target>
1365    
1366    
1367    <target name="jsr166edist-clean"  <!-- Find buglets that can be detected by static build tools -->
           description="Removes all build and distribution products">  
1368    
1369      <target name="lint">
1370        <antcall target="dists">
1371          <param name="build.javadoc.access" value="public"/>
1372        </antcall>
1373    </target>    </target>
1374    
1375    <target name="jsr166edist-docs"  <!-- Generates all doclint warnings, even for private methods (rarely useful) -->
1376            description="Builds javadocs without custom tags to dist folder">    <target name="lint-private">
1377        <antcall target="dist">
1378          <param name="build.javadoc.access" value="private"/>
1379        </antcall>
1380      </target>
1381    
     <delete dir="${dist.jsr166ejavadocs.dir}"/>  
     <mkdir dir="${dist.jsr166ejavadocs.dir}"/>  
1382    
1383      <javadoc destdir="${dist.jsr166ejavadocs.dir}"  <!-- ==============================================================
1384               packagenames="jsr166e,jsr166e.extra"    Experimental errorprone support - http://errorprone.info
1385               link="${jdkapidocs.url}"  =================================================================== -->
1386               source="1.7"    <property name="errorprone.jar" location="${lib.dir}/error_prone_ant-2.1.2.jar"/>
1387               sourcepath="${topsrc.dir}:${jdksrc.dir}"    <target name="errorprone"
1388               additionalparam="-XDignore.symbol.file=true" />            depends="clean, configure-compiler"
1389              description="Run errorprone over jsr166 source code (experimental)">
1390    
1391    </target>      <local name="destdir"/>
1392        <property name="destdir" value="${build.classes.dir}/java.base"/>
1393        <mkdir dir="${destdir}"/>
1394    
1395    <target name="jsr166edist-jar"      <javac srcdir="${src.dir}"
1396            depends="jsr166eclean, jsr166ejar">             destdir="${destdir}"
1397               debug="${build.debug}"
1398               debuglevel="${build.debuglevel}"
1399               deprecation="${build.deprecation}"
1400               classpath=""
1401               includeAntRuntime="false"
1402               includeJavaRuntime="false"
1403               encoding="ASCII"
1404               executable="${build.main.javac}"
1405               fork="true">
1406    
1407          <include name="**/*.java"/>
1408          <compilerarg line="-processorpath ${errorprone.jar}"/>
1409          <compilerarg value="-Xplugin:ErrorProne
1410                              -Xep:IdentityBinaryExpression:WARN
1411                              -Xep:MissingOverride:OFF
1412                              -Xep:MixedArrayDimensions:ERROR
1413                              -Xep:RemoveUnusedImports:ERROR
1414                              -Xep:ClassName:ERROR
1415                              -Xep:MultipleTopLevelClasses:ERROR
1416                              -Xep:EmptyIf:ERROR
1417                              -Xep:LongLiteralLowerCaseSuffix:ERROR
1418                              -Xep:RedundantThrows:ERROR
1419                              -Xep:MethodCanBeStatic:WARN"/>
1420          <compilerarg value="--patch-module=java.base=${src.dir}"/>
1421          <compilerarg value="-Xprefer:source"/>
1422          <compilerarg value="-XDignore.symbol.file=true"/>
1423          <compilerarg value="-Xlint:all"/>
1424          <compilerarg value="-Xdoclint:all/protected,reference/private"/>
1425          <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1426          <compilerarg line="${build.args}"/>
1427        </javac>
1428    
1429        <jar destfile="${product.jar}">
1430          <fileset dir="${destdir}"/>
1431        </jar>
1432    
1433      <copy file="${jsr166eproduct.jar}" todir="${dist.dir}"/>      <run-tck-tests
1434          target="${build.main.java.version}"
1435          workdir="${build.dir}"
1436          classes="${product.jar}">
1437          <javac-elements>
1438            <compilerarg line="-processorpath ${errorprone.jar}"/>
1439            <compilerarg value="-Xplugin:ErrorProne
1440                                -Xep:IdentityBinaryExpression:WARN
1441                                -Xep:BoxedPrimitiveConstructor:OFF
1442                                -Xep:HashtableContains:OFF
1443                                -Xep:ModifyingCollectionWithItself:OFF
1444                                -Xep:MissingOverride:OFF
1445                                -Xep:MissingFail:OFF
1446                                -Xep:JdkObsolete:OFF
1447                                -Xep:MixedArrayDimensions:ERROR
1448                                -Xep:RemoveUnusedImports:ERROR
1449                                -Xep:ClassName:ERROR
1450                                -Xep:MultipleTopLevelClasses:ERROR
1451                                -Xep:EmptyIf:ERROR
1452                                -Xep:LongLiteralLowerCaseSuffix:ERROR
1453                                -Xep:RedundantThrows:ERROR
1454                                -Xep:MethodCanBeStatic:WARN"/>
1455            <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1456          </javac-elements>
1457        </run-tck-tests>
1458      </target>
1459    
1460      <!-- ant errorprone-jtreg |& grep -EA1 '(warning|error):' -->
1461      <target name="errorprone-jtreg"
1462              depends="jar"
1463              description="Run errorprone over jtreg tests (experimental)">
1464    
1465        <run-jtreg-tests
1466           target="${build.main.java.version}"
1467           workdir="${build.dir}"
1468           classes="${product.jar}"
1469           verbose="all">
1470          <jtreg-elements>
1471            <arg value="-javacoption:-processorpath"/>
1472            <arg value="-javacoption:${errorprone.jar}"/>
1473            <arg value="-javacoption:-Xplugin:ErrorProne
1474                                -Xep:IdentityBinaryExpression:WARN
1475                                -Xep:BoxedPrimitiveConstructor:OFF
1476                                -Xep:HashtableContains:OFF
1477                                -Xep:ModifyingCollectionWithItself:OFF
1478                                -Xep:MissingOverride:OFF
1479                                -Xep:JdkObsolete:OFF
1480                                -Xep:NonAtomicVolatileUpdate:OFF
1481                                -Xep:MixedArrayDimensions:ERROR
1482                                -Xep:RemoveUnusedImports:ERROR
1483                                -Xep:ClassName:ERROR
1484                                -Xep:MultipleTopLevelClasses:ERROR
1485                                -Xep:EmptyIf:ERROR
1486                                -Xep:LongLiteralLowerCaseSuffix:ERROR
1487                                -Xep:RedundantThrows:ERROR
1488                                -Xep:MethodCanBeStatic:WARN"/>
1489          </jtreg-elements>
1490        </run-jtreg-tests>
1491      </target>
1492    
1493    
1494    <!-- ==============================================================
1495      Running guava tests against jsr166 code
1496    =================================================================== -->
1497    
1498    <!-- <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" -->
1499    <!--   organisation="com.google.guava" module="guava-testlib" revision="21.0"/> -->
1500    <!-- <property name="guava.version" value="21.0"/> -->
1501    
1502    <!-- HOWTO debug print a path id -->
1503    <!-- <pathconvert property="guava.testlib.classpath" refid="guava.testlib.classpath" /> -->
1504    <!-- <echo message="guava.testlib.classpath=${guava.testlib.classpath}"/> -->
1505    
1506    <!-- <ivy:retrieve pathid="guava.tests.classpath" type="jar" inline="true" conf="*" pattern="${lib.dir}/[type]/[artifact].[ext]" -->
1507    <!--   organisation="com.google.guava" module="guava-tests"/> -->
1508    <!-- <get src="http://repo2.maven.org/maven2/com/google/guava/guava-tests/${guava.version}/guava-tests-${guava.version}-tests.jar" -->
1509    <!--   dest="${lib.dir}/jar/guava-tests-tests.jar" usetimestamp="true"/> -->
1510    <!--     <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" type="*" -->
1511    <!--       organisation="com.google.guava" module="guava-testlib" revision="${guava.version}"/> -->
1512    
1513    <!-- <test name="com.google.common.collect.testing.TestsForQueuesInJavaUtil"/> -->
1514    <!-- <test name="com.google.common.collect.testing.TestsForListsInJavaUtil"/> -->
1515    <!-- <test name="com.google.common.collect.testing.TestsForSetsInJavaUtil"/> -->
1516    <!-- <test name="com.google.common.collect.testing.TestsForMapsInJavaUtil"/> -->
1517    
1518    <!-- <ivy:retrieve pathid="guava.testlib.classpath" -->
1519    <!--   type="*" inline="true" conf="*(private),*(public)" -->
1520    <!--   pattern="${guava.dir}/[artifact].[ext]" -->
1521    <!--   organisation="com.google.guava" module="guava-testlib"/> -->
1522    
1523    <!-- Work around bug below by downloading guava-testlib-tests.jar "by hand": -->
1524    <!-- https://issues.apache.org/jira/browse/IVY-1444 -->
1525    <!-- maven tests artifacts cannot be downloaded because they are mapped to private configurations -->
1526    
1527      <target name="init-ivy">
1528        <get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar"
1529             dest="${build.dir}/ivy.jar" usetimestamp="true" skipexisting="true"/>
1530        <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant"
1531                 classpath="${build.dir}/ivy.jar"/>
1532      </target>
1533    
1534      <target name="guava-tests" depends="jar, init-ivy"
1535              description="Guava tests run against jsr166 collections">
1536        <property name="guava.dir" value="${build.dir}/guava-testlib"/>
1537        <mkdir dir="${guava.dir}"/>
1538        <ivy:retrieve pathid="guava.testlib.classpath"
1539          type="jar,bundle" inline="true" conf="default,master"
1540          pattern="${guava.dir}/[artifact].[ext]"
1541          organisation="com.google.guava" module="guava-testlib"/>
1542        <property name="guava.version" value="21.0"/>
1543        <get src="http://repo2.maven.org/maven2/com/google/guava/guava-testlib/${guava.version}/guava-testlib-${guava.version}-tests.jar"
1544             dest="${guava.dir}/guava-testlib-tests.jar" usetimestamp="true"/>
1545        <junit printsummary="true" showoutput="true" haltonfailure="true"
1546               jvm="${build.main.java}" fork="true">
1547          <jvmarg line="-ea -esa --patch-module=java.base=${product.jar}"/>
1548          <formatter type="brief"/>
1549          <classpath>
1550            <pathelement location="${guava.dir}/guava-testlib-tests.jar"/>
1551            <path refid="guava.testlib.classpath"/>
1552          </classpath>
1553    
1554          <!-- "6" in "OpenJdk6Tests" misleadingly means "6+" -->
1555          <test name="com.google.common.collect.testing.OpenJdk6Tests"/>
1556        </junit>
1557    </target>    </target>
1558    
1559  </project>  </project>

Legend:
Removed from v.1.100  
changed lines
  Added in v.1.259

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8