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

Diff of /jsr166/build.xml

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

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

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

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