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

Annotation of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.258 - (hide annotations)
Tue Oct 31 17:47:57 2017 UTC (2 years, 1 month ago) by jsr166
Branch: MAIN
Changes since 1.257: +1 -1 lines
File MIME type: text/xml
jdk9 early access docs RIP

1 jsr166 1.177 <project name="jsr166" default="usage"
2 jsr166 1.229 xmlns:if="ant:if" xmlns:unless="ant:unless"
3     xmlns:ivy="antlib:org.apache.ivy.ant">
4 tim 1.1
5     <description>
6 tim 1.29 ------------------------------------------------------------------------------
7     Build file for JSR-166
8 tim 1.18
9 tim 1.29 Usage: ant [target]
10    
11 jsr166 1.202 See http://gee.cs.oswego.edu/dl/concurrency-interest/index.html for
12     more details.
13    
14 tim 1.29 User-specific settings are read from user.properties.
15 tim 1.32 See user.properties.sample for an explanation of some useful settings.
16 jsr166 1.98
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 jsr166 1.151 $HOME/jdk/jdk9
23 jsr166 1.232 $HOME/jdk/jdk10
24 jsr166 1.99 where each of the above is a JDK or a symlink to same, and
25     $HOME/jdk/src/jdk8
26 jsr166 1.151 $HOME/jdk/src/jdk9
27 jsr166 1.232 $HOME/jdk/src/jdk10
28 jsr166 1.99 where each of the above is a complete JDK source tree
29     (e.g. mercurial forest) or a symlink to same.
30 jsr166 1.159
31     Alternatively, define ant variables thus:
32 jsr166 1.199 ant -Djdk$N.home=... -Djdk$N.src.home=...
33 jsr166 1.241 for $N in 8 9 10 ...
34 jsr166 1.182
35 jsr166 1.232 As of 2016-03, the sources in src/main are for jdk9+ only.
36 tim 1.29 ------------------------------------------------------------------------------
37 tim 1.18 </description>
38 tim 1.11
39 jsr166 1.210 <!-- Run 'ant -projecthelp' (default target) -->
40 jsr166 1.148 <target name="usage">
41 jsr166 1.129 <java classname="org.apache.tools.ant.Main">
42     <arg value="-projecthelp" />
43     </java>
44 tim 1.29 </target>
45 tim 1.3
46 jsr166 1.177 <!-- HOWTO printf debug: <echo message="prop=${prop}"/> -->
47 tim 1.11
48 tim 1.27 <!-- User-specific settings -->
49 tim 1.23 <property file="user.properties"/>
50 tim 1.27
51 tim 1.1
52     <!-- Compilation options -->
53 jsr166 1.114 <property name="build.sourcelevel" value="6"/>
54 tim 1.1 <property name="build.debug" value="true"/>
55     <property name="build.debuglevel" value="source,lines,vars"/>
56 tim 1.13 <property name="build.deprecation" value="false"/>
57 jsr166 1.130 <property name="build.javadoc.access" value="protected"/>
58 tim 1.1
59     <!-- Build locations -->
60 jsr166 1.79 <property name="build.dir" location="build"/>
61     <property name="build.classes.dir" location="${build.dir}/classes"/>
62     <property name="build.testcases.dir" location="${build.dir}/testcases"/>
63     <property name="build.loops.dir" location="${build.dir}/loops"/>
64 jsr166 1.92
65 jsr166 1.109 <property name="build.4jdk7.dir" location="${build.dir}/jsr166-4jdk7"/>
66     <property name="build.4jdk7.classes.dir" location="${build.4jdk7.dir}/classes"/>
67 jsr166 1.113 <property name="build.4jdk7.tck.classes.dir" location="${build.4jdk7.dir}/tck-classes"/>
68 jsr166 1.109 <property name="build.4jdk7.docs.dir" location="${build.4jdk7.dir}/docs"/>
69 jsr166 1.92
70 jsr166 1.200 <property name="build.4jdk8.dir" location="${build.dir}/jsr166-4jdk8"/>
71     <property name="build.4jdk8.classes.dir" location="${build.4jdk8.dir}/classes"/>
72     <property name="build.4jdk8.tck.classes.dir" location="${build.4jdk8.dir}/tck-classes"/>
73     <property name="build.4jdk8.docs.dir" location="${build.4jdk8.dir}/docs"/>
74    
75 jsr166 1.79 <property name="build.jsr166x.dir" location="${build.dir}/jsr166x"/>
76     <property name="build.jsr166y.dir" location="${build.dir}/jsr166y"/>
77 dl 1.90 <property name="build.jsr166e.dir" location="${build.dir}/jsr166e"/>
78 jsr166 1.79 <property name="build.extra166y.dir" location="${build.dir}/extra166y"/>
79 dl 1.76
80 jsr166 1.126 <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 jsr166 1.114
85 jsr166 1.118 <!-- JDK locations -->
86 jsr166 1.92 <property name="jdks.home" location="${user.home}/jdk"/>
87 jsr166 1.93
88     <macrodef name="defjdklocations">
89     <attribute name="v"/>
90     <sequential>
91 jsr166 1.199 <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 jsr166 1.181 <local name="have.java.base"/>
97     <available property="have.java.base"
98 jsr166 1.199 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 jsr166 1.181 if:set="have.java.base"/>
101 jsr166 1.199 <property name="jdk@{v}.src.dir" location="${jdk@{v}.src.home}/jdk/src/share/classes"
102 jsr166 1.181 unless:set="have.java.base"/>
103 jsr166 1.182 <local name="modules"/>
104     <available property="modules" file="${jdk@{v}.home}/jmods" type="dir"/>
105 jsr166 1.118 <local name="boot.jar.dir"/>
106 jsr166 1.182 <property name="boot.jar.dir" location="${jdk@{v}.home}/jre/lib" unless:set="modules"/>
107     <path id="bootclasspath@{v}" unless:set="modules">
108 jsr166 1.118 <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 jsr166 1.182 <property name="bootclasspath@{v}" value="${toString:bootclasspath@{v}}" unless:set="modules"/>
115 jsr166 1.93 </sequential>
116     </macrodef>
117    
118 jsr166 1.125 <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 jsr166 1.93 <defjdklocations v="6"/>
131     <defjdklocations v="7"/>
132     <defjdklocations v="8"/>
133 jsr166 1.151 <defjdklocations v="9"/>
134 jsr166 1.232 <defjdklocations v="10"/>
135 jsr166 1.92
136 tim 1.1 <!-- Source locations -->
137 tim 1.22 <property name="src.dir" location="${basedir}/src/main"/>
138     <property name="test.src.dir" location="${basedir}/src/test"/>
139 jsr166 1.65 <property name="loops.src.dir" location="${basedir}/src/loops"/>
140 tim 1.60 <property name="tck.src.dir" location="${test.src.dir}/tck"/>
141 jsr166 1.173 <property name="jtreg7.src.dir" location="${test.src.dir}/jtreg-jdk7"/>
142 jsr166 1.200 <property name="jtreg8.src.dir" location="${test.src.dir}/jtreg-jdk8"/>
143 jsr166 1.173 <property name="jtreg9.src.dir" location="${test.src.dir}/jtreg"/>
144 jsr166 1.232 <property name="jtreg10.src.dir" location="${test.src.dir}/jtreg"/>
145 jsr166 1.173 <property name="jtreg.src.dir" location="${jtreg9.src.dir}"/>
146 tim 1.1 <property name="lib.dir" location="${basedir}/lib"/>
147 tim 1.9 <property name="dist.dir" location="${basedir}/dist"/>
148 dl 1.70 <property name="topsrc.dir" location="${basedir}/src"/>
149 jsr166 1.99 <property name="4jdk7src.dir" location="${topsrc.dir}/jdk7"/>
150 jsr166 1.200 <property name="4jdk8src.dir" location="${topsrc.dir}/jdk8"/>
151 jsr166 1.92 <property name="jsr166xsrc.dir" location="${topsrc.dir}/jsr166x"/>
152     <property name="jsr166ysrc.dir" location="${topsrc.dir}/jsr166y"/>
153     <property name="jsr166esrc.dir" location="${topsrc.dir}/jsr166e"/>
154     <property name="extra166ysrc.dir" location="${topsrc.dir}/extra166y"/>
155 jsr166 1.91
156 jsr166 1.125 <!-- Javadoc locations -->
157 jsr166 1.127 <property name="docs.dir" location="${build.dir}/docs"/>
158     <property name="4jdk7docs.dir" location="${build.4jdk7.dir}/docs"/>
159 jsr166 1.200 <property name="4jdk8docs.dir" location="${build.4jdk8.dir}/docs"/>
160 jsr166 1.127 <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 jsr166 1.200 <property name="dist.4jdk8docs.dir" location="${dist.dir}/jsr166-4jdk8docs"/>
168 jsr166 1.127 <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 tim 1.1
173     <!-- Jar locations -->
174 jsr166 1.109 <property name="product.jar" location="${build.dir}/jsr166.jar"/>
175     <property name="4jdk7product.jar" location="${build.4jdk7.dir}/jsr166-4jdk7.jar"/>
176 jsr166 1.200 <property name="4jdk8product.jar" location="${build.4jdk8.dir}/jsr166-4jdk8.jar"/>
177 jsr166 1.109 <property name="jsr166x.jar" location="${build.jsr166x.dir}/jsr166x.jar"/>
178     <property name="jsr166y.jar" location="${build.jsr166y.dir}/jsr166y.jar"/>
179     <property name="jsr166e.jar" location="${build.jsr166e.dir}/jsr166e.jar"/>
180     <property name="extra166y.jar" location="${build.extra166y.dir}/extra166y.jar"/>
181 jsr166 1.106 <property name="junit.jar" location="${lib.dir}/junit.jar"/>
182 jsr166 1.65
183 jsr166 1.152 <!-- Canonical location of jdk docs root, to use with javadoc -Xdocrootparent flag -->
184 jsr166 1.257 <!-- Switched to https: in 2017-10 - JDK-8190312 -->
185     <property name="java5.docroot.url" value="https://docs.oracle.com/javase/1.5.0/docs"/>
186     <property name="java6.docroot.url" value="https://docs.oracle.com/javase/6/docs"/>
187     <property name="java7.docroot.url" value="https://docs.oracle.com/javase/7/docs"/>
188     <property name="java8.docroot.url" value="https://docs.oracle.com/javase/8/docs"/>
189     <property name="java9.docroot.url" value="https://docs.oracle.com/javase/9/docs"/>
190 jsr166 1.258 <!-- The location of jdk9 early access docs (RIP) -->
191 jsr166 1.253 <!-- <property name="java9.docroot.url" value="http://download.java.net/java/jdk9/docs"/> -->
192 jsr166 1.152 <!-- Default jdk doc location (latest stable release seems best) -->
193 jsr166 1.253 <property name="java.docroot.url" value="${java9.docroot.url}"/>
194 jsr166 1.151
195 jsr166 1.152 <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
196     <property name="java5.api.url" value="${java5.docroot.url}/api/"/>
197     <property name="java6.api.url" value="${java6.docroot.url}/api/"/>
198     <property name="java7.api.url" value="${java7.docroot.url}/api/"/>
199     <property name="java8.api.url" value="${java8.docroot.url}/api/"/>
200     <property name="java9.api.url" value="${java9.docroot.url}/api/"/>
201     <property name="java.api.url" value="${java.docroot.url}/api/"/>
202 jsr166 1.91
203 jsr166 1.115 <!-- Define the "jtreg" task -->
204     <!-- See the docs in "jtreg -onlineHelp" -->
205     <taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant"
206     classpath="${lib.dir}/jtreg.jar" />
207    
208 jsr166 1.183 <!-- 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 jsr166 1.118 <macrodef name="run-tck-tests">
218 jsr166 1.122 <attribute name="tck.src.dir" default="${tck.src.dir}"/>
219 jsr166 1.118 <attribute name="target"/>
220 jsr166 1.138 <attribute name="compile-target" default="@{target}"/>
221 jsr166 1.118 <attribute name="workdir"/>
222 jsr166 1.122 <attribute name="classes"/>
223 dl 1.201 <!--
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 jsr166 1.132 <element name="javac-elements" optional="true"/>
228 jsr166 1.182
229 jsr166 1.118 <sequential>
230    
231 jsr166 1.182 <local name="modules"/>
232     <condition property="modules">
233     <available file="${jdk@{compile-target}.home}/jmods" type="dir"/>
234     </condition>
235    
236 jsr166 1.238 <local name="use-doclint"/>
237     <condition property="use-doclint">
238     <not> <equals arg1="@{target}" arg2="7"/> </not>
239     </condition>
240    
241 jsr166 1.118 <mkdir dir="@{workdir}/tck-classes"/>
242    
243 jsr166 1.122 <javac srcdir="@{tck.src.dir}"
244 jsr166 1.118 destdir="@{workdir}/tck-classes"
245     debug="${build.debug}"
246     debuglevel="${build.debuglevel}"
247     deprecation="${build.deprecation}"
248 jsr166 1.138 source="@{compile-target}"
249     target="@{compile-target}"
250 jsr166 1.118 classpath="${junit.jar}"
251     includeAntRuntime="false"
252     includeJavaRuntime="false"
253 jsr166 1.219 encoding="ASCII"
254 jsr166 1.138 executable="${javac@{compile-target}}"
255 jsr166 1.118 fork="true">
256    
257 jsr166 1.121 <include name="*.java"/>
258 jsr166 1.118 <compilerarg value="-XDignore.symbol.file=true"/>
259 jsr166 1.187 <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>
260 jsr166 1.238 <compilerarg value="-Xdoclint:reference/private" if:set="use-doclint"/>
261 jsr166 1.182 <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
262 jsr166 1.233 <compilerarg value="--patch-module=java.base=@{classes}" if:set="modules"/>
263 jsr166 1.118 <compilerarg line="${build.args}"/>
264 jsr166 1.132 <javac-elements/>
265 jsr166 1.118
266     </javac>
267    
268 jsr166 1.140 <java classname="${jsr166.tckTestClass}"
269 jsr166 1.118 failonerror="true"
270     jvm="${java@{target}}"
271     fork="true">
272 jsr166 1.182 <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
273 jsr166 1.233 <jvmarg value="--patch-module=java.base=@{classes}" if:set="modules"/>
274     <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     <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 jsr166 1.118 <jvmarg line="@{jvmflags}"/>
280 jsr166 1.214 <!-- ant -Dvmoptions="-Xmx8m" -Djsr166.tckTestClass=CompletableFutureTest tck -->
281     <jvmarg line="${vmoptions}" if:set="vmoptions"/>
282 jsr166 1.160
283 jsr166 1.214 <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
284 jsr166 1.183 <syspropertyset id="system-properties-used-by-tck">
285 jsr166 1.160 <propertyref prefix="java.util.concurrent.ForkJoinPool"/>
286 jsr166 1.184 <propertyref prefix="jsr166."/>
287 jsr166 1.197 <propertyref name="test.timeout.factor"/>
288 jsr166 1.160 </syspropertyset>
289    
290 jsr166 1.118 <classpath>
291     <pathelement location="${junit.jar}"/>
292     <pathelement location="@{workdir}/tck-classes"/>
293     </classpath>
294     </java>
295    
296     </sequential>
297     </macrodef>
298    
299 jsr166 1.165 <!-- Define jtreg test sets for different jdk versions -->
300 jsr166 1.246 <fileset dir="${jtreg10.src.dir}">
301     <patternset id="jdk10.jtreg.tests">
302     <include name="**/*.java"/>
303     </patternset>
304     </fileset>
305    
306 jsr166 1.173 <fileset dir="${jtreg9.src.dir}">
307 jsr166 1.165 <patternset id="jdk9.jtreg.tests">
308     <include name="**/*.java"/>
309     </patternset>
310     </fileset>
311    
312 jsr166 1.173 <fileset dir="${jtreg8.src.dir}">
313 jsr166 1.165 <patternset id="jdk8.jtreg.tests">
314     <include name="**/*.java"/>
315     </patternset>
316     </fileset>
317    
318 jsr166 1.173 <fileset dir="${jtreg7.src.dir}">
319 jsr166 1.165 <patternset id="jdk7.jtreg.tests">
320     <include name="**/*.java"/>
321     </patternset>
322     </fileset>
323    
324 jsr166 1.195 <!-- ant -Djtreg.flags=-timeoutFactor:4 -->
325     <property name="jtreg.flags" value=""/>
326    
327 jsr166 1.135 <macrodef name="run-jtreg-tests">
328 jsr166 1.174 <!-- ant -Djtreg9.src.dir=src/test/jtreg/util/concurrent/CompletableFuture jtreg -->
329 jsr166 1.135 <attribute name="target"/>
330     <attribute name="workdir"/>
331     <attribute name="classes"/>
332 jsr166 1.255 <attribute name="verbose" default="${jtreg.verbose}"/>
333 jsr166 1.135 <attribute name="jtregflags" default=""/>
334 jsr166 1.255 <element name="jtreg-elements" optional="true"/>
335 jsr166 1.182
336 jsr166 1.135 <sequential>
337 jsr166 1.182
338 jsr166 1.188 <!-- ant -Djtreg.verbose=time,fail,error jtreg -->
339     <property name="jtreg.verbose" value="nopass,fail,error"/>
340    
341 jsr166 1.182 <local name="modules"/>
342     <condition property="modules">
343     <available file="${jdk@{target}.home}/jmods" type="dir"/>
344     </condition>
345    
346 jsr166 1.135 <delete dir="@{workdir}/JTwork" quiet="true"/>
347 jsr166 1.173 <jtreg dir="${jtreg@{target}.src.dir}"
348 jsr166 1.135 jdk="${jdk@{target}.home}"
349 jsr166 1.223 workDir="@{workdir}/JTwork">
350 jsr166 1.165 <patternset refid="jdk@{target}.jtreg.tests"/>
351 jsr166 1.182 <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
352 jsr166 1.250 <arg value="-javacoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
353     <arg value="-vmoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
354 jsr166 1.135 <arg value="-agentvm"/>
355 jsr166 1.223 <arg value="-noreport"/>
356 jsr166 1.255 <arg value="-verbose:@{verbose}"/>
357 jsr166 1.135 <arg value="-vmoptions:-esa -ea"/>
358     <arg value="-automatic"/>
359     <arg value="-k:!ignore"/>
360     <arg line="@{jtregflags}"/>
361 jsr166 1.195 <arg line="${jtreg.flags}"/>
362 jsr166 1.255 <jtreg-elements/>
363 jsr166 1.135 </jtreg>
364     </sequential>
365     </macrodef>
366    
367 jsr166 1.65 <!-- ALoops classpath -->
368     <path id="loops.classpath">
369     <pathelement location="${build.loops.dir}"/>
370     </path>
371    
372 jsr166 1.100 <!-- Support @jls tag, used in jdk8+ javadoc -->
373 jsr166 1.120 <property name="javadoc.jls.cite" value="The Java&amp;trade; Language Specification"/>
374 jsr166 1.100 <property name="javadoc.jls.option" value="jls:a:See &lt;cite&gt;${javadoc.jls.cite}&lt;/cite&gt;:"/>
375 tim 1.28
376 tim 1.59 <!-- Main targets -->
377 tim 1.28
378 jsr166 1.151 <property name="build.main.java.version" value="9"/>
379 jsr166 1.247 <!-- 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 jsr166 1.151
390 dl 1.80 <target name="dists"
391 jsr166 1.240 depends="dist, 4jdk8dist"
392     description="Builds all public jars and docs"/>
393 dl 1.239 <!--
394     depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"
395     -->
396 tim 1.11
397 tim 1.28 <target name="compile"
398 jsr166 1.100 depends="configure-compiler"
399 jsr166 1.102 description="Compiles src/main sources to build dir">
400 tim 1.27
401 jsr166 1.182 <local name="destdir"/>
402 jsr166 1.247 <property name="destdir" value="${build.classes.dir}/java.base"/>
403 jsr166 1.182
404     <mkdir dir="${destdir}"/>
405 tim 1.27
406 tim 1.60 <javac srcdir="${src.dir}"
407 jsr166 1.182 destdir="${destdir}"
408 jsr166 1.100 debug="${build.debug}"
409     debuglevel="${build.debuglevel}"
410     deprecation="${build.deprecation}"
411     classpath=""
412     includeAntRuntime="false"
413     includeJavaRuntime="false"
414 jsr166 1.219 encoding="ASCII"
415 jsr166 1.151 executable="${build.main.javac}"
416 jsr166 1.100 fork="true">
417 tim 1.1
418 jsr166 1.68 <include name="**/*.java"/>
419 jsr166 1.247 <compilerarg value="--patch-module=java.base=${src.dir}"/>
420 jsr166 1.133 <compilerarg value="-Xprefer:source"/>
421 dl 1.83 <compilerarg value="-XDignore.symbol.file=true"/>
422 jsr166 1.100 <compilerarg value="-Xlint:all"/>
423 jsr166 1.243 <compilerarg line="--doclint-format html5"/>
424     <compilerarg value="-Xdoclint:all/protected,reference/private"/>
425 jsr166 1.164 <compilerarg value="-Werror"/>
426 jsr166 1.146 <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
427 dl 1.73 <compilerarg line="${build.args}"/>
428 tim 1.1
429     </javac>
430     </target>
431    
432    
433 tim 1.28 <target name="jar"
434 tim 1.59 depends="compile"
435 jsr166 1.205 description="Builds library jar for src/main from compiled sources">
436 jsr166 1.212 <local name="subdir"/>
437     <available property="subdir" file="${build.classes.dir}/java.base" type="dir" value="/java.base"/>
438 tim 1.59 <jar destfile="${product.jar}">
439 jsr166 1.212 <fileset dir="${build.classes.dir}${subdir}"/>
440 jsr166 1.178 <manifest>
441 jsr166 1.179 <attribute name="Built-By" value="${user.name}"/>
442     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
443 jsr166 1.178 </manifest>
444 tim 1.59 </jar>
445     </target>
446    
447 tim 1.1
448 tim 1.59 <target name="docs"
449 jsr166 1.102 description="Builds javadocs for src/main to dist dir">
450 tim 1.59
451 jsr166 1.127 <delete dir="${docs.dir}"/>
452     <mkdir dir="${docs.dir}"/>
453 tim 1.59
454 jsr166 1.88 <!-- the packagenames="none" hack below prevents scanning the -->
455     <!-- sourcepath for packages -->
456    
457 jsr166 1.226 <!-- 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 jsr166 1.127 <javadoc destdir="${docs.dir}"
463 jsr166 1.88 packagenames="none"
464 jsr166 1.152 link="${java9.api.url}"
465 jsr166 1.88 overview="${src.dir}/intro.html"
466 jsr166 1.130 access="${build.javadoc.access}"
467 jsr166 1.216 sourcepath="${src.dir}"
468 jsr166 1.100 classpath=""
469 jsr166 1.244 source="9"
470 jsr166 1.247 executable="${build.main.javadoc}">
471 jsr166 1.119 <fileset dir="${src.dir}" defaultexcludes="yes">
472     <include name="**/*.java"/>
473     </fileset>
474 jsr166 1.152 <arg line="-Xdocrootparent ${java9.docroot.url}"/>
475 jsr166 1.146 <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
476 jsr166 1.100 <arg value="-XDignore.symbol.file=true"/>
477 jsr166 1.243 <arg value="-html5"/>
478 jsr166 1.234 <arg value="--patch-module=java.base=${src.dir}"/>
479 jsr166 1.100 <arg value="-tag"/>
480     <arg value="${javadoc.jls.option}"/>
481 jsr166 1.220 <!-- @apiNote currently unused -->
482     <!-- <arg value="-tag"/> -->
483 jsr166 1.221 <!-- <arg value="apiNote:a:API Note:"/> -->
484 dl 1.143 <arg value="-tag"/>
485 jsr166 1.221 <arg value="implSpec:a:Implementation Requirements:"/>
486 dl 1.143 <arg value="-tag"/>
487 jsr166 1.221 <arg value="implNote:a:Implementation Note:"/>
488 jsr166 1.220 <!-- 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 tim 1.59 </javadoc>
494     </target>
495    
496    
497 tim 1.28 <target name="dist"
498 jsr166 1.125 depends="dist-clean, dist-jar, dist-docs"
499 tim 1.16 description="Puts all distributable products in single hierarchy"/>
500 tim 1.1
501 tim 1.58
502 tim 1.42 <target name="release"
503     depends="dist"
504     description="Puts entire CVS tree, plus distribution productions, in a jar">
505    
506     <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
507    
508     <jar basedir="${basedir}" destfile="${release.jar}">
509 tim 1.58 <!-- <exclude name="build/**"/> -->
510 tim 1.42 <exclude name="${release.jar}"/>
511     <exclude name="user.properties"/>
512     <exclude name="etc/notes/**"/>
513 tim 1.58 <exclude name="src/emulation/**"/>
514 tim 1.44 <exclude name="**/SyntaxTest.java"/>
515 tim 1.58 <exclude name="**/SuperfluousAbstract.java"/>
516 jsr166 1.178 <manifest>
517 jsr166 1.179 <attribute name="Built-By" value="${user.name}"/>
518     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
519 jsr166 1.178 </manifest>
520 tim 1.42 </jar>
521     </target>
522 tim 1.1
523 tim 1.59
524 tim 1.11 <target name="clean"
525     description="Removes all build products">
526     <delete dir="${build.dir}"/>
527 tim 1.1 </target>
528    
529    
530 tim 1.11 <target name="dist-clean"
531     description="Removes all build and distribution products">
532 jsr166 1.148 <delete dir="${build.dir}"/>
533 tim 1.11 <delete dir="${dist.dir}"/>
534 tim 1.9 </target>
535 tim 1.10
536    
537 tim 1.28 <target name="dist-jar"
538     depends="clean, jar">
539 tim 1.11 <copy file="${product.jar}" todir="${dist.dir}"/>
540 jsr166 1.125 </target>
541 tim 1.27
542 jsr166 1.125 <target name="dist-docs"
543     depends="clean, docs">
544 jsr166 1.127 <mirror-dir src="${docs.dir}" dst="${dist.docs.dir}"/>
545 tim 1.11 </target>
546    
547 jsr166 1.174 <target name="tck"
548 jsr166 1.131 depends="jar"
549 jsr166 1.205 description="Runs tck tests for src/main directly">
550 jsr166 1.131
551     <run-tck-tests
552 jsr166 1.151 target="${build.main.java.version}"
553 jsr166 1.131 workdir="${build.dir}"
554 jsr166 1.236 classes="${product.jar}">
555     <javac-elements>
556     <compilerarg value="-Werror"/>
557     </javac-elements>
558     </run-tck-tests>
559 jsr166 1.131 </target>
560 tim 1.1
561 jsr166 1.174 <target name="tck-parallelism-1"
562 jsr166 1.208 description="Runs tck with common pool parallelism 1">
563 jsr166 1.174 <antcall target="tck">
564 jsr166 1.160 <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="1"/>
565     </antcall>
566     </target>
567    
568 jsr166 1.174 <target name="tck-parallelism-0"
569 jsr166 1.208 description="Runs tck with common pool parallelism 0">
570 jsr166 1.174 <antcall target="tck">
571 jsr166 1.160 <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="0"/>
572     </antcall>
573     </target>
574    
575 jsr166 1.213 <target name="tck-security-manager"
576     description="Runs tck with a security manager">
577     <antcall target="tck">
578     <param name="jsr166.useSecurityManager" value="true"/>
579     </antcall>
580     </target>
581    
582 jsr166 1.174 <target name="jtreg"
583 jsr166 1.135 depends="jar"
584 jsr166 1.205 description="Runs jtreg tests for src/main using the jtreg ant task">
585 jsr166 1.135 <run-jtreg-tests
586 jsr166 1.151 target="${build.main.java.version}"
587 jsr166 1.135 workdir="${build.dir}"
588     classes="${product.jar}"/>
589     </target>
590    
591 jsr166 1.142 <target name="test"
592 jsr166 1.208 depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"
593 jsr166 1.241 description="Runs tck and jtreg tests for src/main"/>
594 jsr166 1.135
595 jsr166 1.205 <!-- <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->
596 jsr166 1.168
597 jsr166 1.205 <!-- <antcall target="jtreg"> -->
598     <!-- <param name="build.main.java.version" value="8"/> -->
599     <!-- <param name="build.main.javac" value="${javac8}"/> -->
600     <!-- </antcall> -->
601 jsr166 1.168
602 jsr166 1.205 <!-- </target> -->
603 jsr166 1.168
604 jsr166 1.248 <target name="test910"
605     description="Runs tck and jtreg tests for src/main for multiple java versions">
606 jsr166 1.151
607 jsr166 1.248 <antcall target="clean"/>
608     <antcall target="test">
609     <param name="build.main.java.version" value="9"/>
610     </antcall>
611 jsr166 1.151
612 jsr166 1.248 <antcall target="clean"/>
613     <antcall target="test">
614     <param name="build.main.java.version" value="10"/>
615     </antcall>
616 jsr166 1.151
617 jsr166 1.251 <!-- Clean up to avoid obscure wrong class file version bugs -->
618     <antcall target="clean"/>
619    
620 jsr166 1.248 </target>
621 jsr166 1.151
622 tim 1.18
623    
624 tim 1.32 <target name="configure-compiler">
625 jsr166 1.180 <fail message="ant version too old">
626 jsr166 1.237 <condition> <not> <antversion atleast="1.9.1"/> </not> </condition>
627 jsr166 1.180 </fail>
628 tim 1.54
629     <property name="unchecked.option" value="-Xlint:unchecked"/>
630    
631     <condition property="warnunchecked.arg" value="${unchecked.option}">
632 tim 1.57 <istrue value="${build.warnunchecked}"/>
633 tim 1.32 </condition>
634    
635 tim 1.37 <property name="warnunchecked.arg" value=""/>
636 tim 1.34
637 tim 1.32
638     <!-- Common options in javac invocations -->
639 tim 1.57 <property name="build.args" value="${warnunchecked.arg}"/>
640 tim 1.33
641     </target>
642    
643    
644 tim 1.28
645 jsr166 1.65 <!-- Various demos and test programs -->
646    
647    
648 jsr166 1.203 <!-- description="Benchmark from Doug Lea's AQS paper" -->
649     <target name="loops" depends="configure-compiler">
650 jsr166 1.65
651     <mkdir dir="${build.loops.dir}"/>
652    
653     <javac srcdir="${loops.src.dir}"
654     destdir="${build.loops.dir}"
655     debug="${build.debug}"
656     debuglevel="${build.debuglevel}"
657     deprecation="${build.deprecation}"
658     source="${build.sourcelevel}"
659 jsr166 1.191 target="${build.sourcelevel}"
660 jsr166 1.219 encoding="ASCII"
661 jsr166 1.65 fork="true">
662    
663     <compilerarg line="${build.args}"/>
664     <classpath refid="loops.classpath"/>
665 dl 1.84 <compilerarg value="-XDignore.symbol.file=true"/>
666 jsr166 1.65
667     </javac>
668    
669     <java classname="ALoops" fork="true">
670     <classpath refid="loops.classpath"/>
671     </java>
672     </target>
673    
674    
675 jsr166 1.166 <target name="compile-test-loops" depends="jar"
676 jsr166 1.241 description="Compiles all the perf tests in src/test/loops">
677 jsr166 1.166
678     <mkdir dir="${build.dir}/test/loops"/>
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 jsr166 1.219 encoding="ASCII"
688 jsr166 1.247 executable="${build.main.javac}"
689 jsr166 1.166 fork="true">
690    
691     <include name="*.java"/>
692     <compilerarg value="-XDignore.symbol.file=true"/>
693 jsr166 1.167 <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
694 jsr166 1.166 <compilerarg value="-Xbootclasspath/p:${product.jar}"/>
695     <compilerarg line="${build.args}"/>
696     </javac>
697     </target>
698    
699    
700 jsr166 1.200 <!-- jsr166 4jdk8 -->
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 jsr166 1.219 encoding="ASCII"
720 jsr166 1.200 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>
730    
731     <target name="4jdk8doclint"
732     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 jsr166 1.219 encoding="ASCII"
749 jsr166 1.200 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 jsr166 1.235 <compilerarg value="-Xdoclint:all/protected,reference/private"/>
756 jsr166 1.200 <compilerarg line="${build.args}"/>
757     </javac>
758     </target>
759    
760    
761     <target name="4jdk8jar"
762     depends="4jdk8compile"
763     description="Builds library jar from compiled sources">
764    
765     <jar destfile="${4jdk8product.jar}">
766     <fileset dir="${build.4jdk8.classes.dir}"/>
767     <manifest>
768     <attribute name="Built-By" value="${user.name}"/>
769     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
770     </manifest>
771     </jar>
772     </target>
773    
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 jsr166 1.236 <compilerarg value="-Werror"/>
788 jsr166 1.200 </javac-elements>
789     </run-tck-tests>
790     </target>
791    
792    
793     <target name="4jdk8-jtreg"
794     depends="4jdk8jar"
795     description="Runs jtreg tests for jsr166-4jdk8 using the jtreg ant task">
796     <run-jtreg-tests
797     target="8"
798     workdir="${build.4jdk8.dir}"
799     classes="${4jdk8product.jar}"/>
800     </target>
801    
802    
803     <target name="4jdk8-test"
804     depends="4jdk8-tck, 4jdk8-jtreg"
805 jsr166 1.241 description="Runs tck and jtreg tests for jsr166-4jdk8"/>
806 jsr166 1.200
807    
808     <target name="4jdk8docs"
809     description="Builds javadocs for src/jdk8 to dist dir">
810    
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 jsr166 1.244 source="8"
822 jsr166 1.206 executable="${javadoc8}"
823     failonerror = "true">
824 jsr166 1.200 <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">
825     <include name="**/*.java"/>
826     </fileset>
827     <arg line="-Xdocrootparent ${java8.docroot.url}"/>
828     <arg value="-XDignore.symbol.file=true"/>
829     <arg value="-tag"/>
830     <arg value="${javadoc.jls.option}"/>
831 jsr166 1.220 <!-- @apiNote currently unused -->
832     <!-- <arg value="-tag"/> -->
833     <!-- <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/> -->
834 jsr166 1.200 <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>
840    
841    
842     <target name="4jdk8dist"
843     depends="4jdk8dist-jar, 4jdk8dist-docs"
844     description="Puts all distributable products in single hierarchy"/>
845    
846    
847     <target name="4jdk8clean"
848     description="Removes all 4jdk8 build products">
849     <delete dir="${build.4jdk8.dir}"/>
850     </target>
851    
852    
853     <target name="4jdk8dist-jar"
854     depends="4jdk8clean, 4jdk8jar">
855     <copy file="${4jdk8product.jar}" todir="${dist.dir}"/>
856     </target>
857    
858    
859     <target name="4jdk8dist-docs"
860     depends="4jdk8clean, 4jdk8docs">
861     <mirror-dir src="${4jdk8docs.dir}" dst="${dist.4jdk8docs.dir}"/>
862     </target>
863    
864    
865 jsr166 1.241 <!-- jsr166 4jdk7 (no longer maintained) -->
866 jsr166 1.200
867 jsr166 1.241 <target name="4jdk7compile" depends="configure-compiler">
868 jsr166 1.99 <mkdir dir="${build.4jdk7.classes.dir}"/>
869 jsr166 1.92
870 jsr166 1.99 <javac srcdir="${4jdk7src.dir}"
871     destdir="${build.4jdk7.classes.dir}"
872 jsr166 1.92 debug="${build.debug}"
873     debuglevel="${build.debuglevel}"
874     deprecation="${build.deprecation}"
875 jsr166 1.107 source="6"
876 jsr166 1.190 target="6"
877 jsr166 1.92 classpath=""
878 jsr166 1.119 bootclasspath="${bootclasspath6}"
879 jsr166 1.92 includeAntRuntime="false"
880     includeJavaRuntime="false"
881 jsr166 1.219 encoding="ASCII"
882 jsr166 1.97 executable="${javac7}"
883 jsr166 1.92 fork="true">
884    
885     <include name="**/*.java"/>
886 jsr166 1.133 <compilerarg value="-Xprefer:source"/>
887 jsr166 1.92 <compilerarg value="-XDignore.symbol.file=true"/>
888     <compilerarg value="-Xlint:all"/>
889 jsr166 1.164 <compilerarg value="-Werror"/>
890 jsr166 1.118 <compilerarg line="${build.args}"/>
891 jsr166 1.92 </javac>
892 jsr166 1.118 </target>
893 jsr166 1.92
894 jsr166 1.241 <target name="4jdk7doclint" depends="configure-compiler">
895 jsr166 1.149 <mkdir dir="${build.4jdk7.classes.dir}"/>
896    
897     <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 jsr166 1.190 target="6"
904 jsr166 1.149 classpath=""
905 jsr166 1.190 bootclasspath="${bootclasspath6}"
906 jsr166 1.149 includeAntRuntime="false"
907     includeJavaRuntime="false"
908 jsr166 1.219 encoding="ASCII"
909 jsr166 1.149 executable="${javac8}"
910     fork="true">
911    
912     <include name="**/*.java"/>
913     <compilerarg value="-Xprefer:source"/>
914     <compilerarg value="-XDignore.symbol.file=true"/>
915     <compilerarg value="-Xlint:all"/>
916     <compilerarg value="-Xdoclint:all/protected"/>
917     <compilerarg line="${build.args}"/>
918     </javac>
919     </target>
920    
921 jsr166 1.241 <target name="4jdk7jar" depends="4jdk7compile">
922 jsr166 1.116 <jar destfile="${4jdk7product.jar}">
923 jsr166 1.99 <fileset dir="${build.4jdk7.classes.dir}"/>
924 jsr166 1.178 <manifest>
925 jsr166 1.179 <attribute name="Built-By" value="${user.name}"/>
926     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
927 jsr166 1.178 </manifest>
928 jsr166 1.97 </jar>
929 jsr166 1.92 </target>
930    
931 jsr166 1.241 <target name="4jdk7-tck" depends="4jdk7jar">
932 jsr166 1.97 <run-tck-tests
933 jsr166 1.116 target="7"
934     workdir="${build.4jdk7.dir}"
935 jsr166 1.132 classes="${4jdk7product.jar}">
936     <javac-elements>
937 jsr166 1.134 <!-- JDK8+ test classes -->
938 jsr166 1.137 <exclude name="*8Test.java"/>
939 jsr166 1.151 <exclude name="*9Test.java"/>
940 jsr166 1.176 <exclude name="*10Test.java"/>
941 jsr166 1.138 <exclude name="DoubleAccumulatorTest.java"/>
942     <exclude name="DoubleAdderTest.java"/>
943     <exclude name="LongAccumulatorTest.java"/>
944     <exclude name="LongAdderTest.java"/>
945 jsr166 1.137 <exclude name="CompletableFutureTest.java"/>
946 jsr166 1.145 <exclude name="SplittableRandomTest.java"/>
947 jsr166 1.132 <exclude name="StampedLockTest.java"/>
948 jsr166 1.176 <exclude name="SubmissionPublisherTest.java"/>
949 jsr166 1.236 <compilerarg value="-Werror"/>
950 jsr166 1.132 </javac-elements>
951     </run-tck-tests>
952 jsr166 1.97 </target>
953    
954 jsr166 1.203 <!-- Runs tck tests for jsr166-4jdk7 via junit task (dead experiment) -->
955 jsr166 1.241 <target name="4jdk7-tck-junit" depends="4jdk7compile">
956 jsr166 1.97
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 jsr166 1.99 <jvmarg value="-Xbootclasspath/p:${4jdk7product.jar}"/>
966 jsr166 1.97 <jvmarg value="-server"/>
967 jsr166 1.92
968 jsr166 1.97 <classpath>
969     <pathelement location="${junit.jar}"/>
970 jsr166 1.99 <pathelement location="${build.4jdk7.tck.classes.dir}"/>
971 jsr166 1.97 </classpath>
972 jsr166 1.92
973 jsr166 1.97 <formatter type="brief"/>
974 jsr166 1.92
975 jsr166 1.140 <test name="${jsr166.tckTestClass}" haltonfailure="no">
976 jsr166 1.97 </test>
977     </junit>
978 jsr166 1.92 </target>
979    
980 jsr166 1.241 <target name="4jdk7-jtreg" depends="4jdk7jar">
981 jsr166 1.135 <run-jtreg-tests
982     target="7"
983     workdir="${build.4jdk7.dir}"
984 jsr166 1.165 classes="${4jdk7product.jar}"/>
985 jsr166 1.115 </target>
986    
987 jsr166 1.241 <target name="4jdk7-test" depends="4jdk7-tck, 4jdk7-jtreg"/>
988 jsr166 1.115
989 jsr166 1.241 <target name="4jdk7docs">
990 jsr166 1.127 <delete dir="${4jdk7docs.dir}"/>
991     <mkdir dir="${4jdk7docs.dir}"/>
992 jsr166 1.92
993 jsr166 1.127 <javadoc destdir="${4jdk7docs.dir}"
994 jsr166 1.92 packagenames="none"
995 jsr166 1.152 link="${java7.api.url}"
996 jsr166 1.99 overview="${4jdk7src.dir}/intro.html"
997 jsr166 1.130 access="${build.javadoc.access}"
998 jsr166 1.199 sourcepath="${4jdk7src.dir}:${jdk7.src.dir}"
999 jsr166 1.92 classpath=""
1000 jsr166 1.206 executable="${javadoc7}"
1001     failonerror = "true">
1002 jsr166 1.99 <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">
1003 jsr166 1.92 <include name="**/*.java"/>
1004     </fileset>
1005 jsr166 1.152 <arg line="-Xdocrootparent ${java7.docroot.url}"/>
1006 jsr166 1.119 <arg value="-XDignore.symbol.file=true"/>
1007 jsr166 1.92 </javadoc>
1008     </target>
1009    
1010 jsr166 1.241 <target name="4jdk7dist" depends="4jdk7dist-jar, 4jdk7dist-docs"/>
1011 jsr166 1.92
1012 jsr166 1.241 <target name="4jdk7clean">
1013 jsr166 1.99 <delete dir="${build.4jdk7.dir}"/>
1014 jsr166 1.92 </target>
1015    
1016 jsr166 1.241 <target name="4jdk7dist-jar" depends="4jdk7clean, 4jdk7jar">
1017 jsr166 1.125 <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>
1018     </target>
1019 jsr166 1.92
1020 jsr166 1.241 <target name="4jdk7dist-docs" depends="4jdk7clean, 4jdk7docs">
1021 jsr166 1.127 <mirror-dir src="${4jdk7docs.dir}" dst="${dist.4jdk7docs.dir}"/>
1022 jsr166 1.92 </target>
1023    
1024 jsr166 1.109
1025 jsr166 1.241 <!-- jsr166x (no longer maintained) -->
1026 dl 1.70
1027 jsr166 1.241 <target name="jsr166xcompile" depends="configure-compiler">
1028 jsr166 1.114 <mkdir dir="${build.jsr166x.classes.dir}"/>
1029 dl 1.70
1030 jsr166 1.105 <javac srcdir="${topsrc.dir}"
1031 jsr166 1.114 destdir="${build.jsr166x.classes.dir}"
1032 jsr166 1.105 debug="${build.debug}"
1033     debuglevel="${build.debuglevel}"
1034     deprecation="${build.deprecation}"
1035     classpath=""
1036 jsr166 1.119 bootclasspath="${bootclasspath6}"
1037 jsr166 1.107 source="5"
1038 jsr166 1.190 target="5"
1039 jsr166 1.105 includeAntRuntime="false"
1040     includeJavaRuntime="false"
1041 jsr166 1.219 encoding="ASCII"
1042 jsr166 1.105 executable="${javac7}"
1043     fork="true">
1044     <include name="jsr166x/**/*.java"/>
1045 dl 1.84 <compilerarg value="-XDignore.symbol.file=true"/>
1046 jsr166 1.105 <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>
1047 jsr166 1.164 <compilerarg value="-Werror"/>
1048 jsr166 1.118 <compilerarg line="${build.args}"/>
1049 dl 1.70 </javac>
1050     </target>
1051    
1052 jsr166 1.241 <target name="jsr166xjar" depends="jsr166xcompile">
1053 jsr166 1.106 <jar destfile="${jsr166x.jar}">
1054 jsr166 1.114 <fileset dir="${build.jsr166x.classes.dir}"/>
1055 jsr166 1.178 <manifest>
1056 jsr166 1.179 <attribute name="Built-By" value="${user.name}"/>
1057     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1058 jsr166 1.178 </manifest>
1059 dl 1.70 </jar>
1060     </target>
1061    
1062 jsr166 1.241 <target name="jsr166xdocs">
1063 jsr166 1.127 <delete dir="${jsr166xdocs.dir}"/>
1064     <mkdir dir="${jsr166xdocs.dir}"/>
1065 dl 1.70
1066 jsr166 1.127 <javadoc destdir="${jsr166xdocs.dir}"
1067 jsr166 1.107 packagenames="jsr166x.*"
1068 jsr166 1.152 link="${java.api.url}"
1069 jsr166 1.130 access="${build.javadoc.access}"
1070 jsr166 1.199 sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1071 jsr166 1.119 bootclasspath="${bootclasspath6}"
1072 jsr166 1.107 source="5"
1073 jsr166 1.206 executable="${javadoc7}"
1074     failonerror = "true">
1075 jsr166 1.152 <arg line="-Xdocrootparent ${java.docroot.url}"/>
1076 jsr166 1.118 <arg value="-XDignore.symbol.file=true"/>
1077     </javadoc>
1078 dl 1.70 </target>
1079    
1080 jsr166 1.241 <target name="jsr166xdist" depends="jsr166xdist-jar, jsr166xdist-docs"/>
1081 dl 1.70
1082 jsr166 1.241 <target name="jsr166xclean">
1083 dl 1.70 <delete dir="${build.jsr166x.dir}"/>
1084     </target>
1085    
1086 jsr166 1.241 <target name="jsr166xdist-jar" depends="jsr166xclean, jsr166xjar">
1087 jsr166 1.106 <copy file="${jsr166x.jar}" todir="${dist.dir}"/>
1088 jsr166 1.125 </target>
1089 dl 1.70
1090 jsr166 1.241 <target name="jsr166xdist-docs" depends="jsr166xclean, jsr166xdocs">
1091 jsr166 1.127 <mirror-dir src="${jsr166xdocs.dir}" dst="${dist.jsr166xdocs.dir}"/>
1092 dl 1.70 </target>
1093    
1094 dl 1.74
1095 jsr166 1.241 <!-- jsr166y (no longer maintained) -->
1096 dl 1.74
1097 jsr166 1.241 <target name="jsr166ycompile" depends="configure-compiler">
1098 jsr166 1.114 <mkdir dir="${build.jsr166y.classes.dir}"/>
1099 dl 1.74
1100 jsr166 1.103 <javac srcdir="${topsrc.dir}"
1101 jsr166 1.114 destdir="${build.jsr166y.classes.dir}"
1102 jsr166 1.103 debug="${build.debug}"
1103     debuglevel="${build.debuglevel}"
1104     deprecation="${build.deprecation}"
1105 jsr166 1.107 source="6"
1106 jsr166 1.189 target="6"
1107 jsr166 1.103 classpath=""
1108 jsr166 1.119 bootclasspath="${bootclasspath6}"
1109 jsr166 1.103 includeAntRuntime="false"
1110     includeJavaRuntime="false"
1111 jsr166 1.219 encoding="ASCII"
1112 jsr166 1.103 executable="${javac7}"
1113     fork="true">
1114 dl 1.74
1115 jsr166 1.103 <include name="jsr166y/**/*.java"/>
1116 dl 1.83 <compilerarg value="-XDignore.symbol.file=true"/>
1117 jsr166 1.103 <compilerarg value="-Xlint:all"/>
1118 jsr166 1.164 <compilerarg value="-Werror"/>
1119 jsr166 1.118 <compilerarg line="${build.args}"/>
1120 dl 1.74 </javac>
1121     </target>
1122    
1123 jsr166 1.241 <target name="jsr166yjar" depends="jsr166ycompile">
1124 jsr166 1.106 <jar destfile="${jsr166y.jar}" index="true">
1125 jsr166 1.114 <fileset dir="${build.jsr166y.classes.dir}"/>
1126 jsr166 1.178 <manifest>
1127 jsr166 1.179 <attribute name="Built-By" value="${user.name}"/>
1128     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1129 jsr166 1.178 </manifest>
1130 dl 1.74 </jar>
1131     </target>
1132    
1133 jsr166 1.241 <target name="jsr166ydocs">
1134 jsr166 1.127 <delete dir="${jsr166ydocs.dir}"/>
1135     <mkdir dir="${jsr166ydocs.dir}"/>
1136 dl 1.74
1137 jsr166 1.127 <javadoc destdir="${jsr166ydocs.dir}"
1138 jsr166 1.107 packagenames="jsr166y.*"
1139 jsr166 1.152 link="${java.api.url}"
1140 jsr166 1.130 access="${build.javadoc.access}"
1141 jsr166 1.199 sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1142 jsr166 1.119 bootclasspath="${bootclasspath6}"
1143 jsr166 1.107 source="6"
1144 jsr166 1.206 executable="${javadoc7}"
1145     failonerror = "true">
1146 jsr166 1.152 <arg line="-Xdocrootparent ${java.docroot.url}"/>
1147 jsr166 1.118 <arg value="-XDignore.symbol.file=true"/>
1148     </javadoc>
1149 dl 1.74 </target>
1150    
1151 jsr166 1.241 <target name="jsr166ydist" depends="jsr166ydist-jar, jsr166ydist-docs"/>
1152 dl 1.74
1153 jsr166 1.241 <target name="jsr166yclean">
1154 dl 1.74 <delete dir="${build.jsr166y.dir}"/>
1155     </target>
1156    
1157 jsr166 1.241 <target name="jsr166ydist-jar" depends="jsr166yclean, jsr166yjar">
1158 jsr166 1.106 <copy file="${jsr166y.jar}" todir="${dist.dir}"/>
1159 jsr166 1.125 </target>
1160 dl 1.74
1161 jsr166 1.241 <target name="jsr166ydist-docs" depends="jsr166yclean, jsr166ydocs">
1162 jsr166 1.127 <mirror-dir src="${jsr166ydocs.dir}" dst="${dist.jsr166ydocs.dir}"/>
1163 dl 1.74 </target>
1164    
1165 dl 1.90
1166 jsr166 1.241 <!-- extra166y (no longer maintained) -->
1167 dl 1.76
1168 jsr166 1.241 <target name="extra166ycompile" depends="configure-compiler, jsr166yjar">
1169 jsr166 1.114 <mkdir dir="${build.extra166y.classes.dir}"/>
1170 dl 1.76
1171 jsr166 1.103 <javac srcdir="${topsrc.dir}"
1172 jsr166 1.114 destdir="${build.extra166y.classes.dir}"
1173 jsr166 1.103 debug="${build.debug}"
1174     debuglevel="${build.debuglevel}"
1175     deprecation="${build.deprecation}"
1176 jsr166 1.119 bootclasspath="@{jsr166y.jar}:${bootclasspath6}"
1177 jsr166 1.105 classpath=""
1178 jsr166 1.107 source="6"
1179 jsr166 1.190 target="6"
1180 jsr166 1.103 includeAntRuntime="false"
1181     includeJavaRuntime="false"
1182 jsr166 1.219 encoding="ASCII"
1183 jsr166 1.103 executable="${javac7}"
1184     fork="true">
1185 dl 1.76
1186 jsr166 1.103 <include name="extra166y/**/*.java"/>
1187 dl 1.83 <compilerarg value="-XDignore.symbol.file=true"/>
1188 jsr166 1.103 <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
1189 jsr166 1.164 <compilerarg value="-Werror"/>
1190 jsr166 1.118 <compilerarg line="${build.args}"/>
1191 dl 1.76 </javac>
1192     </target>
1193    
1194 jsr166 1.241 <target name="extra166yjar" depends="extra166ycompile">
1195 jsr166 1.106 <jar destfile="${extra166y.jar}" index="true">
1196 jsr166 1.114 <fileset dir="${build.extra166y.classes.dir}"/>
1197 jsr166 1.178 <manifest>
1198 jsr166 1.179 <attribute name="Built-By" value="${user.name}"/>
1199     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1200 jsr166 1.178 </manifest>
1201 dl 1.76 </jar>
1202     </target>
1203    
1204 jsr166 1.241 <target name="extra166ydocs">
1205 jsr166 1.127 <delete dir="${extra166ydocs.dir}"/>
1206     <mkdir dir="${extra166ydocs.dir}"/>
1207 dl 1.76
1208 jsr166 1.127 <javadoc destdir="${extra166ydocs.dir}"
1209 jsr166 1.107 packagenames="extra166y.*"
1210 jsr166 1.152 link="${java.api.url}"
1211 jsr166 1.130 access="${build.javadoc.access}"
1212 jsr166 1.199 sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1213 jsr166 1.119 bootclasspath="${bootclasspath6}"
1214 jsr166 1.107 source="6"
1215 jsr166 1.118 executable="${javadoc7}">
1216 jsr166 1.152 <arg line="-Xdocrootparent ${java.docroot.url}"/>
1217 jsr166 1.118 <arg value="-XDignore.symbol.file=true"/>
1218     </javadoc>
1219 dl 1.76 </target>
1220    
1221 jsr166 1.241 <target name="extra166ydist" depends="extra166ydist-jar, extra166ydist-docs"/>
1222 dl 1.76
1223 jsr166 1.241 <target name="extra166yclean">
1224 dl 1.76 <delete dir="${build.extra166y.dir}"/>
1225     </target>
1226    
1227 jsr166 1.241 <target name="extra166ydist-jar" depends="extra166yclean, extra166yjar">
1228 jsr166 1.106 <copy file="${extra166y.jar}" todir="${dist.dir}"/>
1229 jsr166 1.125 </target>
1230 dl 1.76
1231 jsr166 1.241 <target name="extra166ydist-docs" depends="extra166yclean, extra166ydocs">
1232 jsr166 1.127 <mirror-dir src="${extra166ydocs.dir}" dst="${dist.extra166ydocs.dir}"/>
1233 dl 1.76 </target>
1234    
1235 jsr166 1.241
1236     <!-- jsr166e (no longer maintained) -->
1237 dl 1.90
1238 jsr166 1.144 <property name="build.jsr166e.java.version" value="6"/>
1239     <property name="build.jsr166e.javac" value="${javac6}"/>
1240    
1241 jsr166 1.241 <target name="jsr166ecompile" depends="configure-compiler">
1242 jsr166 1.114 <mkdir dir="${build.jsr166e.classes.dir}"/>
1243 dl 1.90
1244 jsr166 1.95 <javac srcdir="${topsrc.dir}"
1245 jsr166 1.114 destdir="${build.jsr166e.classes.dir}"
1246 jsr166 1.94 debug="${build.debug}"
1247     debuglevel="${build.debuglevel}"
1248     deprecation="${build.deprecation}"
1249 jsr166 1.144 source="${build.jsr166e.java.version}"
1250 jsr166 1.190 target="${build.jsr166e.java.version}"
1251 jsr166 1.94 classpath=""
1252     includeAntRuntime="false"
1253     includeJavaRuntime="false"
1254 jsr166 1.144 executable="${build.jsr166e.javac}"
1255 jsr166 1.94 fork="true">
1256 dl 1.90
1257 jsr166 1.95 <include name="jsr166e/**/*.java"/>
1258 dl 1.90 <compilerarg value="-XDignore.symbol.file=true"/>
1259 jsr166 1.94 <compilerarg value="-Xlint:all"/>
1260 jsr166 1.164 <compilerarg value="-Werror"/>
1261 jsr166 1.118 <compilerarg line="${build.args}"/>
1262 dl 1.90 </javac>
1263     </target>
1264    
1265 jsr166 1.150 <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 jsr166 1.190 target="${build.jsr166e.java.version}"
1275 jsr166 1.150 classpath=""
1276 jsr166 1.190 bootclasspath="${bootclasspath6}"
1277 jsr166 1.150 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 jsr166 1.164 <compilerarg value="-Werror"/>
1286 jsr166 1.150 <compilerarg value="-Xdoclint:all/protected"/>
1287     </javac>
1288     </target>
1289    
1290 jsr166 1.241 <target name="jsr166ejar" depends="jsr166ecompile">
1291 jsr166 1.106 <jar destfile="${jsr166e.jar}" index="true">
1292 jsr166 1.114 <fileset dir="${build.jsr166e.classes.dir}"/>
1293 jsr166 1.178 <manifest>
1294 jsr166 1.179 <attribute name="Built-By" value="${user.name}"/>
1295     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1296 jsr166 1.178 </manifest>
1297 dl 1.90 </jar>
1298     </target>
1299    
1300 jsr166 1.241 <target name="jsr166edocs">
1301 jsr166 1.127 <delete dir="${jsr166edocs.dir}"/>
1302     <mkdir dir="${jsr166edocs.dir}"/>
1303 dl 1.90
1304 jsr166 1.127 <javadoc destdir="${jsr166edocs.dir}"
1305 jsr166 1.107 packagenames="jsr166e.*"
1306 jsr166 1.152 link="${java.api.url}"
1307 jsr166 1.130 access="${build.javadoc.access}"
1308 jsr166 1.199 sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1309 jsr166 1.144 source="${build.jsr166e.java.version}"
1310 jsr166 1.206 executable="${javadoc7}"
1311     failonerror = "true">
1312 jsr166 1.152 <arg line="-Xdocrootparent ${java.docroot.url}"/>
1313 jsr166 1.118 <arg value="-XDignore.symbol.file=true"/>
1314 jsr166 1.96 </javadoc>
1315 dl 1.90 </target>
1316    
1317 jsr166 1.241 <target name="jsr166e-tck-one-java-version" depends="jsr166ejar">
1318 jsr166 1.144 <echo message="Testing with jdk${build.jsr166e.java.version} ..."/>
1319 jsr166 1.122 <run-tck-tests
1320     tck.src.dir="${test.src.dir}/tck-jsr166e"
1321 jsr166 1.144 target="${build.jsr166e.java.version}"
1322 jsr166 1.122 workdir="${build.jsr166e.dir}"
1323     classes="${jsr166e.jar}"/>
1324     </target>
1325    
1326 jsr166 1.241 <target name="jsr166e-tck">
1327 jsr166 1.144
1328     <!-- <antcall target="clean"/> -->
1329 jsr166 1.174 <!-- <antcall target="jsr166e-tck-one-java-version"> -->
1330 jsr166 1.144 <!-- <param name="build.jsr166e.java.version" value="8"/> -->
1331     <!-- <param name="build.jsr166e.javac" value="${javac8}"/> -->
1332     <!-- </antcall> -->
1333    
1334     <antcall target="clean"/>
1335 jsr166 1.174 <antcall target="jsr166e-tck-one-java-version">
1336 jsr166 1.144 <param name="build.jsr166e.java.version" value="7"/>
1337     <param name="build.jsr166e.javac" value="${javac7}"/>
1338     </antcall>
1339    
1340     <antcall target="clean"/>
1341 jsr166 1.174 <antcall target="jsr166e-tck-one-java-version">
1342 jsr166 1.144 <param name="build.jsr166e.java.version" value="6"/>
1343     <param name="build.jsr166e.javac" value="${javac6}"/>
1344     </antcall>
1345     </target>
1346    
1347 jsr166 1.241 <target name="jsr166e-test" depends="jsr166e-tck"/>
1348 jsr166 1.122
1349 jsr166 1.241 <target name="jsr166edist" depends="jsr166edist-jar, jsr166edist-docs"/>
1350 jsr166 1.147
1351 jsr166 1.241 <target name="jsr166eclean">
1352 dl 1.90 <delete dir="${build.jsr166e.dir}"/>
1353     </target>
1354    
1355     <target name="jsr166edist-jar"
1356 jsr166 1.128 depends="jsr166eclean, jsr166ejar">
1357 jsr166 1.106 <copy file="${jsr166e.jar}" todir="${dist.dir}"/>
1358 jsr166 1.125 </target>
1359 dl 1.90
1360 jsr166 1.241 <target name="jsr166edist-docs" depends="jsr166eclean, jsr166edocs">
1361 jsr166 1.127 <mirror-dir src="${jsr166edocs.dir}" dst="${dist.jsr166edocs.dir}"/>
1362 dl 1.90 </target>
1363    
1364 jsr166 1.130
1365     <!-- Find buglets that can be detected by static build tools -->
1366    
1367     <target name="lint">
1368     <antcall target="dists">
1369 jsr166 1.161 <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 jsr166 1.130 <param name="build.javadoc.access" value="private"/>
1377     </antcall>
1378     </target>
1379    
1380 jsr166 1.236
1381     <!-- ==============================================================
1382     Experimental errorprone support - http://errorprone.info
1383     =================================================================== -->
1384 jsr166 1.256 <property name="errorprone.jar" location="${lib.dir}/error_prone_ant-2.1.2.jar"/>
1385 jsr166 1.236 <target name="errorprone"
1386     depends="clean, configure-compiler"
1387 jsr166 1.241 description="Run errorprone over jsr166 source code (experimental)">
1388 jsr166 1.236
1389     <local name="destdir"/>
1390     <property name="destdir" value="${build.classes.dir}/java.base"/>
1391     <mkdir dir="${destdir}"/>
1392    
1393     <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 jsr166 1.254 <compilerarg line="-processorpath ${errorprone.jar}"/>
1407 jsr166 1.236 <compilerarg value="-Xplugin:ErrorProne
1408 jsr166 1.241 -Xep:IdentityBinaryExpression:WARN
1409 jsr166 1.236 -Xep:MissingOverride:OFF
1410 jsr166 1.256 -Xep:MixedArrayDimensions:ERROR
1411 jsr166 1.241 -Xep:RemoveUnusedImports:ERROR
1412 jsr166 1.242 -Xep:ClassName:ERROR
1413     -Xep:MultipleTopLevelClasses:ERROR
1414     -Xep:EmptyIf:ERROR
1415     -Xep:LongLiteralLowerCaseSuffix:ERROR
1416     -Xep:RedundantThrows:ERROR
1417 jsr166 1.236 -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     <jar destfile="${product.jar}">
1428     <fileset dir="${destdir}"/>
1429     </jar>
1430    
1431     <run-tck-tests
1432     target="${build.main.java.version}"
1433     workdir="${build.dir}"
1434     classes="${product.jar}">
1435     <javac-elements>
1436 jsr166 1.254 <compilerarg line="-processorpath ${errorprone.jar}"/>
1437 jsr166 1.241 <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 jsr166 1.256 -Xep:MissingFail:OFF
1444     -Xep:JdkObsolete:OFF
1445     -Xep:MixedArrayDimensions:ERROR
1446 jsr166 1.241 -Xep:RemoveUnusedImports:ERROR
1447 jsr166 1.242 -Xep:ClassName:ERROR
1448     -Xep:MultipleTopLevelClasses:ERROR
1449     -Xep:EmptyIf:ERROR
1450     -Xep:LongLiteralLowerCaseSuffix:ERROR
1451     -Xep:RedundantThrows:ERROR
1452 jsr166 1.236 -Xep:MethodCanBeStatic:WARN"/>
1453     <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1454     </javac-elements>
1455     </run-tck-tests>
1456     </target>
1457    
1458 jsr166 1.255 <!-- 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 jsr166 1.256 -Xep:JdkObsolete:OFF
1478     -Xep:NonAtomicVolatileUpdate:OFF
1479     -Xep:MixedArrayDimensions:ERROR
1480 jsr166 1.255 -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 jsr166 1.236
1492 jsr166 1.229 <!-- ==============================================================
1493     Running guava tests against jsr166 code
1494     =================================================================== -->
1495    
1496     <!-- <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" -->
1497 jsr166 1.230 <!-- organisation="com.google.guava" module="guava-testlib" revision="21.0"/> -->
1498     <!-- <property name="guava.version" value="21.0"/> -->
1499 jsr166 1.229
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 jsr166 1.230 <property name="guava.version" value="21.0"/>
1541 jsr166 1.229 <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 jsr166 1.247 jvm="${build.main.java}" fork="true">
1545 jsr166 1.252 <jvmarg line="-ea -esa --patch-module=java.base=${product.jar}"/>
1546 jsr166 1.229 <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>
1556 jsr166 1.130
1557 tim 1.1 </project>

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