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

Annotation of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.259 - (view) (download) (as text)

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.259 <property name="java10.docroot.url" value="http://download.java.net/java/jdk10/docs"/>
194 : jsr166 1.253 <property name="java.docroot.url" value="${java9.docroot.url}"/>
195 : jsr166 1.151
196 : jsr166 1.152 <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
197 :     <property name="java5.api.url" value="${java5.docroot.url}/api/"/>
198 :     <property name="java6.api.url" value="${java6.docroot.url}/api/"/>
199 :     <property name="java7.api.url" value="${java7.docroot.url}/api/"/>
200 :     <property name="java8.api.url" value="${java8.docroot.url}/api/"/>
201 :     <property name="java9.api.url" value="${java9.docroot.url}/api/"/>
202 : jsr166 1.259 <property name="java10.api.url" value="${java10.docroot.url}/api/"/>
203 : jsr166 1.152 <property name="java.api.url" value="${java.docroot.url}/api/"/>
204 : jsr166 1.91
205 : jsr166 1.115 <!-- Define the "jtreg" task -->
206 :     <!-- See the docs in "jtreg -onlineHelp" -->
207 :     <taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant"
208 :     classpath="${lib.dir}/jtreg.jar" />
209 :    
210 : jsr166 1.183 <!-- Tck options; see JSR166TestCase.java
211 :     To profile a single tck test class:
212 :     ant -Djsr166.profileTests=true -Djsr166.profileThreshold=10 -Djsr166.tckTestClass=CompletableFutureTest tck
213 :     To stress test a single tck test class:
214 :     ant -Djsr166.tckTestClass=CountedCompleterTest -Djsr166.runsPerTest=100 tck
215 :     To stress test a single tck test method:
216 :     ant -Djsr166.tckTestClass=RecursiveTaskTest -Djsr166.runsPerTest=1000 -Djsr166.methodFilter=testAbnormalInvokeAll3 tck
217 :     -->
218 :     <property name="jsr166.tckTestClass" value="JSR166TestCase"/>
219 : jsr166 1.118 <macrodef name="run-tck-tests">
220 : jsr166 1.122 <attribute name="tck.src.dir" default="${tck.src.dir}"/>
221 : jsr166 1.118 <attribute name="target"/>
222 : jsr166 1.138 <attribute name="compile-target" default="@{target}"/>
223 : jsr166 1.118 <attribute name="workdir"/>
224 : jsr166 1.122 <attribute name="classes"/>
225 : dl 1.201 <!--
226 :     <attribute name="jvmflags" default="-XX:+UseParallelGC -XX:-UseBiasedLocking -ea -esa -Djsr166.testImplementationDetails=true"/>
227 :     -->
228 :     <attribute name="jvmflags" default="-ea -esa -Djsr166.testImplementationDetails=true"/>
229 : jsr166 1.132 <element name="javac-elements" optional="true"/>
230 : jsr166 1.182
231 : jsr166 1.118 <sequential>
232 :    
233 : jsr166 1.182 <local name="modules"/>
234 :     <condition property="modules">
235 :     <available file="${jdk@{compile-target}.home}/jmods" type="dir"/>
236 :     </condition>
237 :    
238 : jsr166 1.238 <local name="use-doclint"/>
239 :     <condition property="use-doclint">
240 :     <not> <equals arg1="@{target}" arg2="7"/> </not>
241 :     </condition>
242 :    
243 : jsr166 1.118 <mkdir dir="@{workdir}/tck-classes"/>
244 :    
245 : jsr166 1.122 <javac srcdir="@{tck.src.dir}"
246 : jsr166 1.118 destdir="@{workdir}/tck-classes"
247 :     debug="${build.debug}"
248 :     debuglevel="${build.debuglevel}"
249 :     deprecation="${build.deprecation}"
250 : jsr166 1.138 source="@{compile-target}"
251 :     target="@{compile-target}"
252 : jsr166 1.118 classpath="${junit.jar}"
253 :     includeAntRuntime="false"
254 :     includeJavaRuntime="false"
255 : jsr166 1.219 encoding="ASCII"
256 : jsr166 1.138 executable="${javac@{compile-target}}"
257 : jsr166 1.118 fork="true">
258 :    
259 : jsr166 1.121 <include name="*.java"/>
260 : jsr166 1.118 <compilerarg value="-XDignore.symbol.file=true"/>
261 : jsr166 1.187 <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation,-try"/>
262 : jsr166 1.238 <compilerarg value="-Xdoclint:reference/private" if:set="use-doclint"/>
263 : jsr166 1.182 <compilerarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
264 : jsr166 1.233 <compilerarg value="--patch-module=java.base=@{classes}" if:set="modules"/>
265 : jsr166 1.118 <compilerarg line="${build.args}"/>
266 : jsr166 1.132 <javac-elements/>
267 : jsr166 1.118
268 :     </javac>
269 :    
270 : jsr166 1.140 <java classname="${jsr166.tckTestClass}"
271 : jsr166 1.118 failonerror="true"
272 :     jvm="${java@{target}}"
273 :     fork="true">
274 : jsr166 1.182 <jvmarg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
275 : jsr166 1.233 <jvmarg value="--patch-module=java.base=@{classes}" if:set="modules"/>
276 :     <jvmarg value="--add-opens=java.base/java.lang=ALL-UNNAMED" if:set="modules"/>
277 :     <jvmarg value="--add-opens=java.base/java.util=ALL-UNNAMED" if:set="modules"/>
278 :     <jvmarg value="--add-opens=java.base/java.util.concurrent=ALL-UNNAMED" if:set="modules"/>
279 :     <jvmarg value="--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED" if:set="modules"/>
280 :     <jvmarg value="--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED" if:set="modules"/>
281 : jsr166 1.118 <jvmarg line="@{jvmflags}"/>
282 : jsr166 1.214 <!-- ant -Dvmoptions="-Xmx8m" -Djsr166.tckTestClass=CompletableFutureTest tck -->
283 :     <jvmarg line="${vmoptions}" if:set="vmoptions"/>
284 : jsr166 1.160
285 : jsr166 1.214 <!-- ant -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 tck -->
286 : jsr166 1.183 <syspropertyset id="system-properties-used-by-tck">
287 : jsr166 1.160 <propertyref prefix="java.util.concurrent.ForkJoinPool"/>
288 : jsr166 1.184 <propertyref prefix="jsr166."/>
289 : jsr166 1.197 <propertyref name="test.timeout.factor"/>
290 : jsr166 1.160 </syspropertyset>
291 :    
292 : jsr166 1.118 <classpath>
293 :     <pathelement location="${junit.jar}"/>
294 :     <pathelement location="@{workdir}/tck-classes"/>
295 :     </classpath>
296 :     </java>
297 :    
298 :     </sequential>
299 :     </macrodef>
300 :    
301 : jsr166 1.165 <!-- Define jtreg test sets for different jdk versions -->
302 : jsr166 1.246 <fileset dir="${jtreg10.src.dir}">
303 :     <patternset id="jdk10.jtreg.tests">
304 :     <include name="**/*.java"/>
305 :     </patternset>
306 :     </fileset>
307 :    
308 : jsr166 1.173 <fileset dir="${jtreg9.src.dir}">
309 : jsr166 1.165 <patternset id="jdk9.jtreg.tests">
310 :     <include name="**/*.java"/>
311 :     </patternset>
312 :     </fileset>
313 :    
314 : jsr166 1.173 <fileset dir="${jtreg8.src.dir}">
315 : jsr166 1.165 <patternset id="jdk8.jtreg.tests">
316 :     <include name="**/*.java"/>
317 :     </patternset>
318 :     </fileset>
319 :    
320 : jsr166 1.173 <fileset dir="${jtreg7.src.dir}">
321 : jsr166 1.165 <patternset id="jdk7.jtreg.tests">
322 :     <include name="**/*.java"/>
323 :     </patternset>
324 :     </fileset>
325 :    
326 : jsr166 1.195 <!-- ant -Djtreg.flags=-timeoutFactor:4 -->
327 :     <property name="jtreg.flags" value=""/>
328 :    
329 : jsr166 1.135 <macrodef name="run-jtreg-tests">
330 : jsr166 1.174 <!-- ant -Djtreg9.src.dir=src/test/jtreg/util/concurrent/CompletableFuture jtreg -->
331 : jsr166 1.135 <attribute name="target"/>
332 :     <attribute name="workdir"/>
333 :     <attribute name="classes"/>
334 : jsr166 1.255 <attribute name="verbose" default="${jtreg.verbose}"/>
335 : jsr166 1.135 <attribute name="jtregflags" default=""/>
336 : jsr166 1.255 <element name="jtreg-elements" optional="true"/>
337 : jsr166 1.182
338 : jsr166 1.135 <sequential>
339 : jsr166 1.182
340 : jsr166 1.188 <!-- ant -Djtreg.verbose=time,fail,error jtreg -->
341 :     <property name="jtreg.verbose" value="nopass,fail,error"/>
342 :    
343 : jsr166 1.182 <local name="modules"/>
344 :     <condition property="modules">
345 :     <available file="${jdk@{target}.home}/jmods" type="dir"/>
346 :     </condition>
347 :    
348 : jsr166 1.135 <delete dir="@{workdir}/JTwork" quiet="true"/>
349 : jsr166 1.173 <jtreg dir="${jtreg@{target}.src.dir}"
350 : jsr166 1.135 jdk="${jdk@{target}.home}"
351 : jsr166 1.223 workDir="@{workdir}/JTwork">
352 : jsr166 1.165 <patternset refid="jdk@{target}.jtreg.tests"/>
353 : jsr166 1.182 <arg value="-Xbootclasspath/p:@{classes}" unless:set="modules"/>
354 : jsr166 1.250 <arg value="-javacoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
355 :     <arg value="-vmoptions:--patch-module=java.base=@{classes}" if:set="modules"/>
356 : jsr166 1.135 <arg value="-agentvm"/>
357 : jsr166 1.223 <arg value="-noreport"/>
358 : jsr166 1.255 <arg value="-verbose:@{verbose}"/>
359 : jsr166 1.135 <arg value="-vmoptions:-esa -ea"/>
360 :     <arg value="-automatic"/>
361 :     <arg value="-k:!ignore"/>
362 :     <arg line="@{jtregflags}"/>
363 : jsr166 1.195 <arg line="${jtreg.flags}"/>
364 : jsr166 1.255 <jtreg-elements/>
365 : jsr166 1.135 </jtreg>
366 :     </sequential>
367 :     </macrodef>
368 :    
369 : jsr166 1.65 <!-- ALoops classpath -->
370 :     <path id="loops.classpath">
371 :     <pathelement location="${build.loops.dir}"/>
372 :     </path>
373 :    
374 : jsr166 1.100 <!-- Support @jls tag, used in jdk8+ javadoc -->
375 : jsr166 1.120 <property name="javadoc.jls.cite" value="The Java&amp;trade; Language Specification"/>
376 : jsr166 1.100 <property name="javadoc.jls.option" value="jls:a:See &lt;cite&gt;${javadoc.jls.cite}&lt;/cite&gt;:"/>
377 : tim 1.28
378 : tim 1.59 <!-- Main targets -->
379 : tim 1.28
380 : jsr166 1.151 <property name="build.main.java.version" value="9"/>
381 : jsr166 1.247 <!-- Workaround "no nested properties in ant" -->
382 :     <macrodef name="define-build-main-properties">
383 :     <attribute name="v"/>
384 :     <sequential>
385 :     <property name="build.main.java" value="${java@{v}}"/>
386 :     <property name="build.main.javac" value="${javac@{v}}"/>
387 :     <property name="build.main.javadoc" value="${javadoc@{v}}"/>
388 :     </sequential>
389 :     </macrodef>
390 :     <define-build-main-properties v="${build.main.java.version}"/>
391 : jsr166 1.151
392 : dl 1.80 <target name="dists"
393 : jsr166 1.240 depends="dist, 4jdk8dist"
394 :     description="Builds all public jars and docs"/>
395 : dl 1.239 <!--
396 :     depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"
397 :     -->
398 : tim 1.11
399 : tim 1.28 <target name="compile"
400 : jsr166 1.100 depends="configure-compiler"
401 : jsr166 1.102 description="Compiles src/main sources to build dir">
402 : tim 1.27
403 : jsr166 1.182 <local name="destdir"/>
404 : jsr166 1.247 <property name="destdir" value="${build.classes.dir}/java.base"/>
405 : jsr166 1.182
406 :     <mkdir dir="${destdir}"/>
407 : tim 1.27
408 : tim 1.60 <javac srcdir="${src.dir}"
409 : jsr166 1.182 destdir="${destdir}"
410 : jsr166 1.100 debug="${build.debug}"
411 :     debuglevel="${build.debuglevel}"
412 :     deprecation="${build.deprecation}"
413 :     classpath=""
414 :     includeAntRuntime="false"
415 :     includeJavaRuntime="false"
416 : jsr166 1.219 encoding="ASCII"
417 : jsr166 1.151 executable="${build.main.javac}"
418 : jsr166 1.100 fork="true">
419 : tim 1.1
420 : jsr166 1.68 <include name="**/*.java"/>
421 : jsr166 1.247 <compilerarg value="--patch-module=java.base=${src.dir}"/>
422 : jsr166 1.133 <compilerarg value="-Xprefer:source"/>
423 : dl 1.83 <compilerarg value="-XDignore.symbol.file=true"/>
424 : jsr166 1.100 <compilerarg value="-Xlint:all"/>
425 : jsr166 1.243 <compilerarg line="--doclint-format html5"/>
426 :     <compilerarg value="-Xdoclint:all/protected,reference/private"/>
427 : jsr166 1.164 <compilerarg value="-Werror"/>
428 : jsr166 1.146 <compilerarg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
429 : dl 1.73 <compilerarg line="${build.args}"/>
430 : tim 1.1
431 :     </javac>
432 :     </target>
433 :    
434 :    
435 : tim 1.28 <target name="jar"
436 : tim 1.59 depends="compile"
437 : jsr166 1.205 description="Builds library jar for src/main from compiled sources">
438 : jsr166 1.212 <local name="subdir"/>
439 :     <available property="subdir" file="${build.classes.dir}/java.base" type="dir" value="/java.base"/>
440 : tim 1.59 <jar destfile="${product.jar}">
441 : jsr166 1.212 <fileset dir="${build.classes.dir}${subdir}"/>
442 : jsr166 1.178 <manifest>
443 : jsr166 1.179 <attribute name="Built-By" value="${user.name}"/>
444 :     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
445 : jsr166 1.178 </manifest>
446 : tim 1.59 </jar>
447 :     </target>
448 :    
449 : tim 1.1
450 : tim 1.59 <target name="docs"
451 : jsr166 1.102 description="Builds javadocs for src/main to dist dir">
452 : tim 1.59
453 : jsr166 1.127 <delete dir="${docs.dir}"/>
454 :     <mkdir dir="${docs.dir}"/>
455 : tim 1.59
456 : jsr166 1.88 <!-- the packagenames="none" hack below prevents scanning the -->
457 :     <!-- sourcepath for packages -->
458 :    
459 : jsr166 1.226 <!-- TODO: sourcepath="${src.dir}:${jdk9.src.dir}" -->
460 :     <!-- TODO: sourcepath="${src.dir}:${jdk9.src.dir}:${jdk9.src.home}/jdk/src/java.logging/share/classes" -->
461 :     <!-- TODO: sourcepath="${src.dir}:${jdk9.home}/src.zip" -->
462 :     <!-- TODO: <arg line="-sourcepath ${src.dir}:${jdk9.home}/src.zip"/> -->
463 :     <!-- TODO: <arg line="- -module-source-path ${jdk9.home}/src.zip"/> -->
464 : jsr166 1.127 <javadoc destdir="${docs.dir}"
465 : jsr166 1.88 packagenames="none"
466 : jsr166 1.152 link="${java9.api.url}"
467 : jsr166 1.88 overview="${src.dir}/intro.html"
468 : jsr166 1.130 access="${build.javadoc.access}"
469 : jsr166 1.216 sourcepath="${src.dir}"
470 : jsr166 1.100 classpath=""
471 : jsr166 1.244 source="9"
472 : jsr166 1.247 executable="${build.main.javadoc}">
473 : jsr166 1.119 <fileset dir="${src.dir}" defaultexcludes="yes">
474 :     <include name="**/*.java"/>
475 :     </fileset>
476 : jsr166 1.152 <arg line="-Xdocrootparent ${java9.docroot.url}"/>
477 : jsr166 1.146 <arg line="-Xmaxerrs 1000 -Xmaxwarns 1000"/>
478 : jsr166 1.100 <arg value="-XDignore.symbol.file=true"/>
479 : jsr166 1.243 <arg value="-html5"/>
480 : jsr166 1.234 <arg value="--patch-module=java.base=${src.dir}"/>
481 : jsr166 1.100 <arg value="-tag"/>
482 :     <arg value="${javadoc.jls.option}"/>
483 : jsr166 1.220 <!-- @apiNote currently unused -->
484 :     <!-- <arg value="-tag"/> -->
485 : jsr166 1.221 <!-- <arg value="apiNote:a:API Note:"/> -->
486 : dl 1.143 <arg value="-tag"/>
487 : jsr166 1.221 <arg value="implSpec:a:Implementation Requirements:"/>
488 : dl 1.143 <arg value="-tag"/>
489 : jsr166 1.221 <arg value="implNote:a:Implementation Note:"/>
490 : jsr166 1.220 <!-- tags added in jdk9: currently unused -->
491 :     <!-- <arg value="-tag"/> -->
492 :     <!-- <arg value="revised:X"/> -->
493 :     <!-- <arg value="-tag"/> -->
494 :     <!-- <arg value="spec:X"/> -->
495 : tim 1.59 </javadoc>
496 :     </target>
497 :    
498 :    
499 : tim 1.28 <target name="dist"
500 : jsr166 1.125 depends="dist-clean, dist-jar, dist-docs"
501 : tim 1.16 description="Puts all distributable products in single hierarchy"/>
502 : tim 1.1
503 : tim 1.58
504 : tim 1.42 <target name="release"
505 :     depends="dist"
506 :     description="Puts entire CVS tree, plus distribution productions, in a jar">
507 :    
508 :     <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
509 :    
510 :     <jar basedir="${basedir}" destfile="${release.jar}">
511 : tim 1.58 <!-- <exclude name="build/**"/> -->
512 : tim 1.42 <exclude name="${release.jar}"/>
513 :     <exclude name="user.properties"/>
514 :     <exclude name="etc/notes/**"/>
515 : tim 1.58 <exclude name="src/emulation/**"/>
516 : tim 1.44 <exclude name="**/SyntaxTest.java"/>
517 : tim 1.58 <exclude name="**/SuperfluousAbstract.java"/>
518 : jsr166 1.178 <manifest>
519 : jsr166 1.179 <attribute name="Built-By" value="${user.name}"/>
520 :     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
521 : jsr166 1.178 </manifest>
522 : tim 1.42 </jar>
523 :     </target>
524 : tim 1.1
525 : tim 1.59
526 : tim 1.11 <target name="clean"
527 :     description="Removes all build products">
528 :     <delete dir="${build.dir}"/>
529 : tim 1.1 </target>
530 :    
531 :    
532 : tim 1.11 <target name="dist-clean"
533 :     description="Removes all build and distribution products">
534 : jsr166 1.148 <delete dir="${build.dir}"/>
535 : tim 1.11 <delete dir="${dist.dir}"/>
536 : tim 1.9 </target>
537 : tim 1.10
538 :    
539 : tim 1.28 <target name="dist-jar"
540 :     depends="clean, jar">
541 : tim 1.11 <copy file="${product.jar}" todir="${dist.dir}"/>
542 : jsr166 1.125 </target>
543 : tim 1.27
544 : jsr166 1.125 <target name="dist-docs"
545 :     depends="clean, docs">
546 : jsr166 1.127 <mirror-dir src="${docs.dir}" dst="${dist.docs.dir}"/>
547 : tim 1.11 </target>
548 :    
549 : jsr166 1.174 <target name="tck"
550 : jsr166 1.131 depends="jar"
551 : jsr166 1.205 description="Runs tck tests for src/main directly">
552 : jsr166 1.131
553 :     <run-tck-tests
554 : jsr166 1.151 target="${build.main.java.version}"
555 : jsr166 1.131 workdir="${build.dir}"
556 : jsr166 1.236 classes="${product.jar}">
557 :     <javac-elements>
558 :     <compilerarg value="-Werror"/>
559 :     </javac-elements>
560 :     </run-tck-tests>
561 : jsr166 1.131 </target>
562 : tim 1.1
563 : jsr166 1.174 <target name="tck-parallelism-1"
564 : jsr166 1.208 description="Runs tck with common pool parallelism 1">
565 : jsr166 1.174 <antcall target="tck">
566 : jsr166 1.160 <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="1"/>
567 :     </antcall>
568 :     </target>
569 :    
570 : jsr166 1.174 <target name="tck-parallelism-0"
571 : jsr166 1.208 description="Runs tck with common pool parallelism 0">
572 : jsr166 1.174 <antcall target="tck">
573 : jsr166 1.160 <param name="java.util.concurrent.ForkJoinPool.common.parallelism" value="0"/>
574 :     </antcall>
575 :     </target>
576 :    
577 : jsr166 1.213 <target name="tck-security-manager"
578 :     description="Runs tck with a security manager">
579 :     <antcall target="tck">
580 :     <param name="jsr166.useSecurityManager" value="true"/>
581 :     </antcall>
582 :     </target>
583 :    
584 : jsr166 1.174 <target name="jtreg"
585 : jsr166 1.135 depends="jar"
586 : jsr166 1.205 description="Runs jtreg tests for src/main using the jtreg ant task">
587 : jsr166 1.135 <run-jtreg-tests
588 : jsr166 1.151 target="${build.main.java.version}"
589 : jsr166 1.135 workdir="${build.dir}"
590 :     classes="${product.jar}"/>
591 :     </target>
592 :    
593 : jsr166 1.142 <target name="test"
594 : jsr166 1.208 depends="tck, tck-parallelism-1, tck-parallelism-0, jtreg"
595 : jsr166 1.241 description="Runs tck and jtreg tests for src/main"/>
596 : jsr166 1.135
597 : jsr166 1.205 <!-- <target name="jtreg8" description="Runs jtreg tests with jdk8"> -->
598 : jsr166 1.168
599 : jsr166 1.205 <!-- <antcall target="jtreg"> -->
600 :     <!-- <param name="build.main.java.version" value="8"/> -->
601 :     <!-- <param name="build.main.javac" value="${javac8}"/> -->
602 :     <!-- </antcall> -->
603 : jsr166 1.168
604 : jsr166 1.205 <!-- </target> -->
605 : jsr166 1.168
606 : jsr166 1.248 <target name="test910"
607 :     description="Runs tck and jtreg tests for src/main for multiple java versions">
608 : jsr166 1.151
609 : jsr166 1.248 <antcall target="clean"/>
610 :     <antcall target="test">
611 :     <param name="build.main.java.version" value="9"/>
612 :     </antcall>
613 : jsr166 1.151
614 : jsr166 1.248 <antcall target="clean"/>
615 :     <antcall target="test">
616 :     <param name="build.main.java.version" value="10"/>
617 :     </antcall>
618 : jsr166 1.151
619 : jsr166 1.251 <!-- Clean up to avoid obscure wrong class file version bugs -->
620 :     <antcall target="clean"/>
621 :    
622 : jsr166 1.248 </target>
623 : jsr166 1.151
624 : tim 1.18
625 :    
626 : tim 1.32 <target name="configure-compiler">
627 : jsr166 1.180 <fail message="ant version too old">
628 : jsr166 1.237 <condition> <not> <antversion atleast="1.9.1"/> </not> </condition>
629 : jsr166 1.180 </fail>
630 : tim 1.54
631 :     <property name="unchecked.option" value="-Xlint:unchecked"/>
632 :    
633 :     <condition property="warnunchecked.arg" value="${unchecked.option}">
634 : tim 1.57 <istrue value="${build.warnunchecked}"/>
635 : tim 1.32 </condition>
636 :    
637 : tim 1.37 <property name="warnunchecked.arg" value=""/>
638 : tim 1.34
639 : tim 1.32
640 :     <!-- Common options in javac invocations -->
641 : tim 1.57 <property name="build.args" value="${warnunchecked.arg}"/>
642 : tim 1.33
643 :     </target>
644 :    
645 :    
646 : tim 1.28
647 : jsr166 1.65 <!-- Various demos and test programs -->
648 :    
649 :    
650 : jsr166 1.203 <!-- description="Benchmark from Doug Lea's AQS paper" -->
651 :     <target name="loops" depends="configure-compiler">
652 : jsr166 1.65
653 :     <mkdir dir="${build.loops.dir}"/>
654 :    
655 :     <javac srcdir="${loops.src.dir}"
656 :     destdir="${build.loops.dir}"
657 :     debug="${build.debug}"
658 :     debuglevel="${build.debuglevel}"
659 :     deprecation="${build.deprecation}"
660 :     source="${build.sourcelevel}"
661 : jsr166 1.191 target="${build.sourcelevel}"
662 : jsr166 1.219 encoding="ASCII"
663 : jsr166 1.65 fork="true">
664 :    
665 :     <compilerarg line="${build.args}"/>
666 :     <classpath refid="loops.classpath"/>
667 : dl 1.84 <compilerarg value="-XDignore.symbol.file=true"/>
668 : jsr166 1.65
669 :     </javac>
670 :    
671 :     <java classname="ALoops" fork="true">
672 :     <classpath refid="loops.classpath"/>
673 :     </java>
674 :     </target>
675 :    
676 :    
677 : jsr166 1.166 <target name="compile-test-loops" depends="jar"
678 : jsr166 1.241 description="Compiles all the perf tests in src/test/loops">
679 : jsr166 1.166
680 :     <mkdir dir="${build.dir}/test/loops"/>
681 :    
682 :     <javac srcdir="${basedir}/src/test/loops"
683 :     destdir="${build.dir}/test/loops"
684 :     debug="${build.debug}"
685 :     debuglevel="${build.debuglevel}"
686 :     deprecation="${build.deprecation}"
687 :     includeAntRuntime="false"
688 :     includeJavaRuntime="false"
689 : jsr166 1.219 encoding="ASCII"
690 : jsr166 1.247 executable="${build.main.javac}"
691 : jsr166 1.166 fork="true">
692 :    
693 :     <include name="*.java"/>
694 :     <compilerarg value="-XDignore.symbol.file=true"/>
695 : jsr166 1.167 <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
696 : jsr166 1.166 <compilerarg value="-Xbootclasspath/p:${product.jar}"/>
697 :     <compilerarg line="${build.args}"/>
698 :     </javac>
699 :     </target>
700 :    
701 :    
702 : jsr166 1.200 <!-- jsr166 4jdk8 -->
703 :    
704 :     <target name="4jdk8compile"
705 :     depends="configure-compiler"
706 :     description="Compiles src/jdk8 sources, targeting jdk8">
707 :    
708 :     <mkdir dir="${build.4jdk8.classes.dir}"/>
709 :    
710 :     <javac srcdir="${4jdk8src.dir}"
711 :     destdir="${build.4jdk8.classes.dir}"
712 :     debug="${build.debug}"
713 :     debuglevel="${build.debuglevel}"
714 :     deprecation="${build.deprecation}"
715 :     source="8"
716 :     target="8"
717 :     classpath=""
718 :     bootclasspath="${bootclasspath8}"
719 :     includeAntRuntime="false"
720 :     includeJavaRuntime="false"
721 : jsr166 1.219 encoding="ASCII"
722 : jsr166 1.200 executable="${javac8}"
723 :     fork="true">
724 :     <include name="**/*.java"/>
725 :     <compilerarg value="-Xprefer:source"/>
726 :     <compilerarg value="-XDignore.symbol.file=true"/>
727 :     <compilerarg value="-Xlint:all"/>
728 :     <compilerarg value="-Werror"/>
729 :     <compilerarg line="${build.args}"/>
730 :     </javac>
731 :     </target>
732 :    
733 :     <target name="4jdk8doclint"
734 :     depends="configure-compiler"
735 :     description="Finds doclint warnings">
736 :    
737 :     <mkdir dir="${build.4jdk8.classes.dir}"/>
738 :    
739 :     <javac srcdir="${4jdk8src.dir}"
740 :     destdir="${build.4jdk8.classes.dir}"
741 :     debug="${build.debug}"
742 :     debuglevel="${build.debuglevel}"
743 :     deprecation="${build.deprecation}"
744 :     source="8"
745 :     target="8"
746 :     classpath=""
747 :     bootclasspath="${bootclasspath8}"
748 :     includeAntRuntime="false"
749 :     includeJavaRuntime="false"
750 : jsr166 1.219 encoding="ASCII"
751 : jsr166 1.200 executable="${javac8}"
752 :     fork="true">
753 :     <include name="**/*.java"/>
754 :     <compilerarg value="-Xprefer:source"/>
755 :     <compilerarg value="-XDignore.symbol.file=true"/>
756 :     <compilerarg value="-Xlint:all"/>
757 : jsr166 1.235 <compilerarg value="-Xdoclint:all/protected,reference/private"/>
758 : jsr166 1.200 <compilerarg line="${build.args}"/>
759 :     </javac>
760 :     </target>
761 :    
762 :    
763 :     <target name="4jdk8jar"
764 :     depends="4jdk8compile"
765 :     description="Builds library jar from compiled sources">
766 :    
767 :     <jar destfile="${4jdk8product.jar}">
768 :     <fileset dir="${build.4jdk8.classes.dir}"/>
769 :     <manifest>
770 :     <attribute name="Built-By" value="${user.name}"/>
771 :     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
772 :     </manifest>
773 :     </jar>
774 :     </target>
775 :    
776 :    
777 :     <target name="4jdk8-tck"
778 :     depends="4jdk8jar"
779 :     description="Runs tck tests for jsr166-4jdk8 directly">
780 :    
781 :     <run-tck-tests
782 :     target="8"
783 :     workdir="${build.4jdk8.dir}"
784 :     classes="${4jdk8product.jar}">
785 :     <javac-elements>
786 :     <!-- JDK9+ test classes -->
787 :     <exclude name="*9Test.java"/>
788 :     <exclude name="*10Test.java"/>
789 : jsr166 1.236 <compilerarg value="-Werror"/>
790 : jsr166 1.200 </javac-elements>
791 :     </run-tck-tests>
792 :     </target>
793 :    
794 :    
795 :     <target name="4jdk8-jtreg"
796 :     depends="4jdk8jar"
797 :     description="Runs jtreg tests for jsr166-4jdk8 using the jtreg ant task">
798 :     <run-jtreg-tests
799 :     target="8"
800 :     workdir="${build.4jdk8.dir}"
801 :     classes="${4jdk8product.jar}"/>
802 :     </target>
803 :    
804 :    
805 :     <target name="4jdk8-test"
806 :     depends="4jdk8-tck, 4jdk8-jtreg"
807 : jsr166 1.241 description="Runs tck and jtreg tests for jsr166-4jdk8"/>
808 : jsr166 1.200
809 :    
810 :     <target name="4jdk8docs"
811 :     description="Builds javadocs for src/jdk8 to dist dir">
812 :    
813 :     <delete dir="${4jdk8docs.dir}"/>
814 :     <mkdir dir="${4jdk8docs.dir}"/>
815 :    
816 :     <javadoc destdir="${4jdk8docs.dir}"
817 :     packagenames="none"
818 :     link="${java8.api.url}"
819 :     overview="${4jdk8src.dir}/intro.html"
820 :     access="${build.javadoc.access}"
821 :     sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"
822 :     classpath=""
823 : jsr166 1.244 source="8"
824 : jsr166 1.206 executable="${javadoc8}"
825 :     failonerror = "true">
826 : jsr166 1.200 <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">
827 :     <include name="**/*.java"/>
828 :     </fileset>
829 :     <arg line="-Xdocrootparent ${java8.docroot.url}"/>
830 :     <arg value="-XDignore.symbol.file=true"/>
831 :     <arg value="-tag"/>
832 :     <arg value="${javadoc.jls.option}"/>
833 : jsr166 1.220 <!-- @apiNote currently unused -->
834 :     <!-- <arg value="-tag"/> -->
835 :     <!-- <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/> -->
836 : jsr166 1.200 <arg value="-tag"/>
837 :     <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
838 :     <arg value="-tag"/>
839 :     <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
840 :     </javadoc>
841 :     </target>
842 :    
843 :    
844 :     <target name="4jdk8dist"
845 :     depends="4jdk8dist-jar, 4jdk8dist-docs"
846 :     description="Puts all distributable products in single hierarchy"/>
847 :    
848 :    
849 :     <target name="4jdk8clean"
850 :     description="Removes all 4jdk8 build products">
851 :     <delete dir="${build.4jdk8.dir}"/>
852 :     </target>
853 :    
854 :    
855 :     <target name="4jdk8dist-jar"
856 :     depends="4jdk8clean, 4jdk8jar">
857 :     <copy file="${4jdk8product.jar}" todir="${dist.dir}"/>
858 :     </target>
859 :    
860 :    
861 :     <target name="4jdk8dist-docs"
862 :     depends="4jdk8clean, 4jdk8docs">
863 :     <mirror-dir src="${4jdk8docs.dir}" dst="${dist.4jdk8docs.dir}"/>
864 :     </target>
865 :    
866 :    
867 : jsr166 1.241 <!-- jsr166 4jdk7 (no longer maintained) -->
868 : jsr166 1.200
869 : jsr166 1.241 <target name="4jdk7compile" depends="configure-compiler">
870 : jsr166 1.99 <mkdir dir="${build.4jdk7.classes.dir}"/>
871 : jsr166 1.92
872 : jsr166 1.99 <javac srcdir="${4jdk7src.dir}"
873 :     destdir="${build.4jdk7.classes.dir}"
874 : jsr166 1.92 debug="${build.debug}"
875 :     debuglevel="${build.debuglevel}"
876 :     deprecation="${build.deprecation}"
877 : jsr166 1.107 source="6"
878 : jsr166 1.190 target="6"
879 : jsr166 1.92 classpath=""
880 : jsr166 1.119 bootclasspath="${bootclasspath6}"
881 : jsr166 1.92 includeAntRuntime="false"
882 :     includeJavaRuntime="false"
883 : jsr166 1.219 encoding="ASCII"
884 : jsr166 1.97 executable="${javac7}"
885 : jsr166 1.92 fork="true">
886 :    
887 :     <include name="**/*.java"/>
888 : jsr166 1.133 <compilerarg value="-Xprefer:source"/>
889 : jsr166 1.92 <compilerarg value="-XDignore.symbol.file=true"/>
890 :     <compilerarg value="-Xlint:all"/>
891 : jsr166 1.164 <compilerarg value="-Werror"/>
892 : jsr166 1.118 <compilerarg line="${build.args}"/>
893 : jsr166 1.92 </javac>
894 : jsr166 1.118 </target>
895 : jsr166 1.92
896 : jsr166 1.241 <target name="4jdk7doclint" depends="configure-compiler">
897 : jsr166 1.149 <mkdir dir="${build.4jdk7.classes.dir}"/>
898 :    
899 :     <javac srcdir="${4jdk7src.dir}"
900 :     destdir="${build.4jdk7.classes.dir}"
901 :     debug="${build.debug}"
902 :     debuglevel="${build.debuglevel}"
903 :     deprecation="${build.deprecation}"
904 :     source="6"
905 : jsr166 1.190 target="6"
906 : jsr166 1.149 classpath=""
907 : jsr166 1.190 bootclasspath="${bootclasspath6}"
908 : jsr166 1.149 includeAntRuntime="false"
909 :     includeJavaRuntime="false"
910 : jsr166 1.219 encoding="ASCII"
911 : jsr166 1.149 executable="${javac8}"
912 :     fork="true">
913 :    
914 :     <include name="**/*.java"/>
915 :     <compilerarg value="-Xprefer:source"/>
916 :     <compilerarg value="-XDignore.symbol.file=true"/>
917 :     <compilerarg value="-Xlint:all"/>
918 :     <compilerarg value="-Xdoclint:all/protected"/>
919 :     <compilerarg line="${build.args}"/>
920 :     </javac>
921 :     </target>
922 :    
923 : jsr166 1.241 <target name="4jdk7jar" depends="4jdk7compile">
924 : jsr166 1.116 <jar destfile="${4jdk7product.jar}">
925 : jsr166 1.99 <fileset dir="${build.4jdk7.classes.dir}"/>
926 : jsr166 1.178 <manifest>
927 : jsr166 1.179 <attribute name="Built-By" value="${user.name}"/>
928 :     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
929 : jsr166 1.178 </manifest>
930 : jsr166 1.97 </jar>
931 : jsr166 1.92 </target>
932 :    
933 : jsr166 1.241 <target name="4jdk7-tck" depends="4jdk7jar">
934 : jsr166 1.97 <run-tck-tests
935 : jsr166 1.116 target="7"
936 :     workdir="${build.4jdk7.dir}"
937 : jsr166 1.132 classes="${4jdk7product.jar}">
938 :     <javac-elements>
939 : jsr166 1.134 <!-- JDK8+ test classes -->
940 : jsr166 1.137 <exclude name="*8Test.java"/>
941 : jsr166 1.151 <exclude name="*9Test.java"/>
942 : jsr166 1.176 <exclude name="*10Test.java"/>
943 : jsr166 1.138 <exclude name="DoubleAccumulatorTest.java"/>
944 :     <exclude name="DoubleAdderTest.java"/>
945 :     <exclude name="LongAccumulatorTest.java"/>
946 :     <exclude name="LongAdderTest.java"/>
947 : jsr166 1.137 <exclude name="CompletableFutureTest.java"/>
948 : jsr166 1.145 <exclude name="SplittableRandomTest.java"/>
949 : jsr166 1.132 <exclude name="StampedLockTest.java"/>
950 : jsr166 1.176 <exclude name="SubmissionPublisherTest.java"/>
951 : jsr166 1.236 <compilerarg value="-Werror"/>
952 : jsr166 1.132 </javac-elements>
953 :     </run-tck-tests>
954 : jsr166 1.97 </target>
955 :    
956 : jsr166 1.203 <!-- Runs tck tests for jsr166-4jdk7 via junit task (dead experiment) -->
957 : jsr166 1.241 <target name="4jdk7-tck-junit" depends="4jdk7compile">
958 : jsr166 1.97
959 :     <junit printsummary="true"
960 :     showoutput="true"
961 :     errorProperty="junit.failed"
962 :     failureProperty="junit.failed"
963 :     includeantruntime="true"
964 :     jvm="${java7}"
965 :     fork="true">
966 :    
967 : jsr166 1.99 <jvmarg value="-Xbootclasspath/p:${4jdk7product.jar}"/>
968 : jsr166 1.97 <jvmarg value="-server"/>
969 : jsr166 1.92
970 : jsr166 1.97 <classpath>
971 :     <pathelement location="${junit.jar}"/>
972 : jsr166 1.99 <pathelement location="${build.4jdk7.tck.classes.dir}"/>
973 : jsr166 1.97 </classpath>
974 : jsr166 1.92
975 : jsr166 1.97 <formatter type="brief"/>
976 : jsr166 1.92
977 : jsr166 1.140 <test name="${jsr166.tckTestClass}" haltonfailure="no">
978 : jsr166 1.97 </test>
979 :     </junit>
980 : jsr166 1.92 </target>
981 :    
982 : jsr166 1.241 <target name="4jdk7-jtreg" depends="4jdk7jar">
983 : jsr166 1.135 <run-jtreg-tests
984 :     target="7"
985 :     workdir="${build.4jdk7.dir}"
986 : jsr166 1.165 classes="${4jdk7product.jar}"/>
987 : jsr166 1.115 </target>
988 :    
989 : jsr166 1.241 <target name="4jdk7-test" depends="4jdk7-tck, 4jdk7-jtreg"/>
990 : jsr166 1.115
991 : jsr166 1.241 <target name="4jdk7docs">
992 : jsr166 1.127 <delete dir="${4jdk7docs.dir}"/>
993 :     <mkdir dir="${4jdk7docs.dir}"/>
994 : jsr166 1.92
995 : jsr166 1.127 <javadoc destdir="${4jdk7docs.dir}"
996 : jsr166 1.92 packagenames="none"
997 : jsr166 1.152 link="${java7.api.url}"
998 : jsr166 1.99 overview="${4jdk7src.dir}/intro.html"
999 : jsr166 1.130 access="${build.javadoc.access}"
1000 : jsr166 1.199 sourcepath="${4jdk7src.dir}:${jdk7.src.dir}"
1001 : jsr166 1.92 classpath=""
1002 : jsr166 1.206 executable="${javadoc7}"
1003 :     failonerror = "true">
1004 : jsr166 1.99 <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">
1005 : jsr166 1.92 <include name="**/*.java"/>
1006 :     </fileset>
1007 : jsr166 1.152 <arg line="-Xdocrootparent ${java7.docroot.url}"/>
1008 : jsr166 1.119 <arg value="-XDignore.symbol.file=true"/>
1009 : jsr166 1.92 </javadoc>
1010 :     </target>
1011 :    
1012 : jsr166 1.241 <target name="4jdk7dist" depends="4jdk7dist-jar, 4jdk7dist-docs"/>
1013 : jsr166 1.92
1014 : jsr166 1.241 <target name="4jdk7clean">
1015 : jsr166 1.99 <delete dir="${build.4jdk7.dir}"/>
1016 : jsr166 1.92 </target>
1017 :    
1018 : jsr166 1.241 <target name="4jdk7dist-jar" depends="4jdk7clean, 4jdk7jar">
1019 : jsr166 1.125 <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>
1020 :     </target>
1021 : jsr166 1.92
1022 : jsr166 1.241 <target name="4jdk7dist-docs" depends="4jdk7clean, 4jdk7docs">
1023 : jsr166 1.127 <mirror-dir src="${4jdk7docs.dir}" dst="${dist.4jdk7docs.dir}"/>
1024 : jsr166 1.92 </target>
1025 :    
1026 : jsr166 1.109
1027 : jsr166 1.241 <!-- jsr166x (no longer maintained) -->
1028 : dl 1.70
1029 : jsr166 1.241 <target name="jsr166xcompile" depends="configure-compiler">
1030 : jsr166 1.114 <mkdir dir="${build.jsr166x.classes.dir}"/>
1031 : dl 1.70
1032 : jsr166 1.105 <javac srcdir="${topsrc.dir}"
1033 : jsr166 1.114 destdir="${build.jsr166x.classes.dir}"
1034 : jsr166 1.105 debug="${build.debug}"
1035 :     debuglevel="${build.debuglevel}"
1036 :     deprecation="${build.deprecation}"
1037 :     classpath=""
1038 : jsr166 1.119 bootclasspath="${bootclasspath6}"
1039 : jsr166 1.107 source="5"
1040 : jsr166 1.190 target="5"
1041 : jsr166 1.105 includeAntRuntime="false"
1042 :     includeJavaRuntime="false"
1043 : jsr166 1.219 encoding="ASCII"
1044 : jsr166 1.105 executable="${javac7}"
1045 :     fork="true">
1046 :     <include name="jsr166x/**/*.java"/>
1047 : dl 1.84 <compilerarg value="-XDignore.symbol.file=true"/>
1048 : jsr166 1.105 <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>
1049 : jsr166 1.164 <compilerarg value="-Werror"/>
1050 : jsr166 1.118 <compilerarg line="${build.args}"/>
1051 : dl 1.70 </javac>
1052 :     </target>
1053 :    
1054 : jsr166 1.241 <target name="jsr166xjar" depends="jsr166xcompile">
1055 : jsr166 1.106 <jar destfile="${jsr166x.jar}">
1056 : jsr166 1.114 <fileset dir="${build.jsr166x.classes.dir}"/>
1057 : jsr166 1.178 <manifest>
1058 : jsr166 1.179 <attribute name="Built-By" value="${user.name}"/>
1059 :     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1060 : jsr166 1.178 </manifest>
1061 : dl 1.70 </jar>
1062 :     </target>
1063 :    
1064 : jsr166 1.241 <target name="jsr166xdocs">
1065 : jsr166 1.127 <delete dir="${jsr166xdocs.dir}"/>
1066 :     <mkdir dir="${jsr166xdocs.dir}"/>
1067 : dl 1.70
1068 : jsr166 1.127 <javadoc destdir="${jsr166xdocs.dir}"
1069 : jsr166 1.107 packagenames="jsr166x.*"
1070 : jsr166 1.152 link="${java.api.url}"
1071 : jsr166 1.130 access="${build.javadoc.access}"
1072 : jsr166 1.199 sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1073 : jsr166 1.119 bootclasspath="${bootclasspath6}"
1074 : jsr166 1.107 source="5"
1075 : jsr166 1.206 executable="${javadoc7}"
1076 :     failonerror = "true">
1077 : jsr166 1.152 <arg line="-Xdocrootparent ${java.docroot.url}"/>
1078 : jsr166 1.118 <arg value="-XDignore.symbol.file=true"/>
1079 :     </javadoc>
1080 : dl 1.70 </target>
1081 :    
1082 : jsr166 1.241 <target name="jsr166xdist" depends="jsr166xdist-jar, jsr166xdist-docs"/>
1083 : dl 1.70
1084 : jsr166 1.241 <target name="jsr166xclean">
1085 : dl 1.70 <delete dir="${build.jsr166x.dir}"/>
1086 :     </target>
1087 :    
1088 : jsr166 1.241 <target name="jsr166xdist-jar" depends="jsr166xclean, jsr166xjar">
1089 : jsr166 1.106 <copy file="${jsr166x.jar}" todir="${dist.dir}"/>
1090 : jsr166 1.125 </target>
1091 : dl 1.70
1092 : jsr166 1.241 <target name="jsr166xdist-docs" depends="jsr166xclean, jsr166xdocs">
1093 : jsr166 1.127 <mirror-dir src="${jsr166xdocs.dir}" dst="${dist.jsr166xdocs.dir}"/>
1094 : dl 1.70 </target>
1095 :    
1096 : dl 1.74
1097 : jsr166 1.241 <!-- jsr166y (no longer maintained) -->
1098 : dl 1.74
1099 : jsr166 1.241 <target name="jsr166ycompile" depends="configure-compiler">
1100 : jsr166 1.114 <mkdir dir="${build.jsr166y.classes.dir}"/>
1101 : dl 1.74
1102 : jsr166 1.103 <javac srcdir="${topsrc.dir}"
1103 : jsr166 1.114 destdir="${build.jsr166y.classes.dir}"
1104 : jsr166 1.103 debug="${build.debug}"
1105 :     debuglevel="${build.debuglevel}"
1106 :     deprecation="${build.deprecation}"
1107 : jsr166 1.107 source="6"
1108 : jsr166 1.189 target="6"
1109 : jsr166 1.103 classpath=""
1110 : jsr166 1.119 bootclasspath="${bootclasspath6}"
1111 : jsr166 1.103 includeAntRuntime="false"
1112 :     includeJavaRuntime="false"
1113 : jsr166 1.219 encoding="ASCII"
1114 : jsr166 1.103 executable="${javac7}"
1115 :     fork="true">
1116 : dl 1.74
1117 : jsr166 1.103 <include name="jsr166y/**/*.java"/>
1118 : dl 1.83 <compilerarg value="-XDignore.symbol.file=true"/>
1119 : jsr166 1.103 <compilerarg value="-Xlint:all"/>
1120 : jsr166 1.164 <compilerarg value="-Werror"/>
1121 : jsr166 1.118 <compilerarg line="${build.args}"/>
1122 : dl 1.74 </javac>
1123 :     </target>
1124 :    
1125 : jsr166 1.241 <target name="jsr166yjar" depends="jsr166ycompile">
1126 : jsr166 1.106 <jar destfile="${jsr166y.jar}" index="true">
1127 : jsr166 1.114 <fileset dir="${build.jsr166y.classes.dir}"/>
1128 : jsr166 1.178 <manifest>
1129 : jsr166 1.179 <attribute name="Built-By" value="${user.name}"/>
1130 :     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1131 : jsr166 1.178 </manifest>
1132 : dl 1.74 </jar>
1133 :     </target>
1134 :    
1135 : jsr166 1.241 <target name="jsr166ydocs">
1136 : jsr166 1.127 <delete dir="${jsr166ydocs.dir}"/>
1137 :     <mkdir dir="${jsr166ydocs.dir}"/>
1138 : dl 1.74
1139 : jsr166 1.127 <javadoc destdir="${jsr166ydocs.dir}"
1140 : jsr166 1.107 packagenames="jsr166y.*"
1141 : jsr166 1.152 link="${java.api.url}"
1142 : jsr166 1.130 access="${build.javadoc.access}"
1143 : jsr166 1.199 sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1144 : jsr166 1.119 bootclasspath="${bootclasspath6}"
1145 : jsr166 1.107 source="6"
1146 : jsr166 1.206 executable="${javadoc7}"
1147 :     failonerror = "true">
1148 : jsr166 1.152 <arg line="-Xdocrootparent ${java.docroot.url}"/>
1149 : jsr166 1.118 <arg value="-XDignore.symbol.file=true"/>
1150 :     </javadoc>
1151 : dl 1.74 </target>
1152 :    
1153 : jsr166 1.241 <target name="jsr166ydist" depends="jsr166ydist-jar, jsr166ydist-docs"/>
1154 : dl 1.74
1155 : jsr166 1.241 <target name="jsr166yclean">
1156 : dl 1.74 <delete dir="${build.jsr166y.dir}"/>
1157 :     </target>
1158 :    
1159 : jsr166 1.241 <target name="jsr166ydist-jar" depends="jsr166yclean, jsr166yjar">
1160 : jsr166 1.106 <copy file="${jsr166y.jar}" todir="${dist.dir}"/>
1161 : jsr166 1.125 </target>
1162 : dl 1.74
1163 : jsr166 1.241 <target name="jsr166ydist-docs" depends="jsr166yclean, jsr166ydocs">
1164 : jsr166 1.127 <mirror-dir src="${jsr166ydocs.dir}" dst="${dist.jsr166ydocs.dir}"/>
1165 : dl 1.74 </target>
1166 :    
1167 : dl 1.90
1168 : jsr166 1.241 <!-- extra166y (no longer maintained) -->
1169 : dl 1.76
1170 : jsr166 1.241 <target name="extra166ycompile" depends="configure-compiler, jsr166yjar">
1171 : jsr166 1.114 <mkdir dir="${build.extra166y.classes.dir}"/>
1172 : dl 1.76
1173 : jsr166 1.103 <javac srcdir="${topsrc.dir}"
1174 : jsr166 1.114 destdir="${build.extra166y.classes.dir}"
1175 : jsr166 1.103 debug="${build.debug}"
1176 :     debuglevel="${build.debuglevel}"
1177 :     deprecation="${build.deprecation}"
1178 : jsr166 1.119 bootclasspath="@{jsr166y.jar}:${bootclasspath6}"
1179 : jsr166 1.105 classpath=""
1180 : jsr166 1.107 source="6"
1181 : jsr166 1.190 target="6"
1182 : jsr166 1.103 includeAntRuntime="false"
1183 :     includeJavaRuntime="false"
1184 : jsr166 1.219 encoding="ASCII"
1185 : jsr166 1.103 executable="${javac7}"
1186 :     fork="true">
1187 : dl 1.76
1188 : jsr166 1.103 <include name="extra166y/**/*.java"/>
1189 : dl 1.83 <compilerarg value="-XDignore.symbol.file=true"/>
1190 : jsr166 1.103 <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
1191 : jsr166 1.164 <compilerarg value="-Werror"/>
1192 : jsr166 1.118 <compilerarg line="${build.args}"/>
1193 : dl 1.76 </javac>
1194 :     </target>
1195 :    
1196 : jsr166 1.241 <target name="extra166yjar" depends="extra166ycompile">
1197 : jsr166 1.106 <jar destfile="${extra166y.jar}" index="true">
1198 : jsr166 1.114 <fileset dir="${build.extra166y.classes.dir}"/>
1199 : jsr166 1.178 <manifest>
1200 : jsr166 1.179 <attribute name="Built-By" value="${user.name}"/>
1201 :     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1202 : jsr166 1.178 </manifest>
1203 : dl 1.76 </jar>
1204 :     </target>
1205 :    
1206 : jsr166 1.241 <target name="extra166ydocs">
1207 : jsr166 1.127 <delete dir="${extra166ydocs.dir}"/>
1208 :     <mkdir dir="${extra166ydocs.dir}"/>
1209 : dl 1.76
1210 : jsr166 1.127 <javadoc destdir="${extra166ydocs.dir}"
1211 : jsr166 1.107 packagenames="extra166y.*"
1212 : jsr166 1.152 link="${java.api.url}"
1213 : jsr166 1.130 access="${build.javadoc.access}"
1214 : jsr166 1.199 sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1215 : jsr166 1.119 bootclasspath="${bootclasspath6}"
1216 : jsr166 1.107 source="6"
1217 : jsr166 1.118 executable="${javadoc7}">
1218 : jsr166 1.152 <arg line="-Xdocrootparent ${java.docroot.url}"/>
1219 : jsr166 1.118 <arg value="-XDignore.symbol.file=true"/>
1220 :     </javadoc>
1221 : dl 1.76 </target>
1222 :    
1223 : jsr166 1.241 <target name="extra166ydist" depends="extra166ydist-jar, extra166ydist-docs"/>
1224 : dl 1.76
1225 : jsr166 1.241 <target name="extra166yclean">
1226 : dl 1.76 <delete dir="${build.extra166y.dir}"/>
1227 :     </target>
1228 :    
1229 : jsr166 1.241 <target name="extra166ydist-jar" depends="extra166yclean, extra166yjar">
1230 : jsr166 1.106 <copy file="${extra166y.jar}" todir="${dist.dir}"/>
1231 : jsr166 1.125 </target>
1232 : dl 1.76
1233 : jsr166 1.241 <target name="extra166ydist-docs" depends="extra166yclean, extra166ydocs">
1234 : jsr166 1.127 <mirror-dir src="${extra166ydocs.dir}" dst="${dist.extra166ydocs.dir}"/>
1235 : dl 1.76 </target>
1236 :    
1237 : jsr166 1.241
1238 :     <!-- jsr166e (no longer maintained) -->
1239 : dl 1.90
1240 : jsr166 1.144 <property name="build.jsr166e.java.version" value="6"/>
1241 :     <property name="build.jsr166e.javac" value="${javac6}"/>
1242 :    
1243 : jsr166 1.241 <target name="jsr166ecompile" depends="configure-compiler">
1244 : jsr166 1.114 <mkdir dir="${build.jsr166e.classes.dir}"/>
1245 : dl 1.90
1246 : jsr166 1.95 <javac srcdir="${topsrc.dir}"
1247 : jsr166 1.114 destdir="${build.jsr166e.classes.dir}"
1248 : jsr166 1.94 debug="${build.debug}"
1249 :     debuglevel="${build.debuglevel}"
1250 :     deprecation="${build.deprecation}"
1251 : jsr166 1.144 source="${build.jsr166e.java.version}"
1252 : jsr166 1.190 target="${build.jsr166e.java.version}"
1253 : jsr166 1.94 classpath=""
1254 :     includeAntRuntime="false"
1255 :     includeJavaRuntime="false"
1256 : jsr166 1.144 executable="${build.jsr166e.javac}"
1257 : jsr166 1.94 fork="true">
1258 : dl 1.90
1259 : jsr166 1.95 <include name="jsr166e/**/*.java"/>
1260 : dl 1.90 <compilerarg value="-XDignore.symbol.file=true"/>
1261 : jsr166 1.94 <compilerarg value="-Xlint:all"/>
1262 : jsr166 1.164 <compilerarg value="-Werror"/>
1263 : jsr166 1.118 <compilerarg line="${build.args}"/>
1264 : dl 1.90 </javac>
1265 :     </target>
1266 :    
1267 : jsr166 1.150 <target name="jsr166edoclint">
1268 :     <mkdir dir="${build.jsr166e.classes.dir}"/>
1269 :    
1270 :     <javac srcdir="${topsrc.dir}"
1271 :     destdir="${build.jsr166e.classes.dir}"
1272 :     debug="${build.debug}"
1273 :     debuglevel="${build.debuglevel}"
1274 :     deprecation="${build.deprecation}"
1275 :     source="${build.jsr166e.java.version}"
1276 : jsr166 1.190 target="${build.jsr166e.java.version}"
1277 : jsr166 1.150 classpath=""
1278 : jsr166 1.190 bootclasspath="${bootclasspath6}"
1279 : jsr166 1.150 includeAntRuntime="false"
1280 :     includeJavaRuntime="false"
1281 :     executable="${javac8}"
1282 :     fork="true">
1283 :    
1284 :     <include name="jsr166e/**/*.java"/>
1285 :     <compilerarg value="-XDignore.symbol.file=true"/>
1286 :     <compilerarg value="-Xlint:all"/>
1287 : jsr166 1.164 <compilerarg value="-Werror"/>
1288 : jsr166 1.150 <compilerarg value="-Xdoclint:all/protected"/>
1289 :     </javac>
1290 :     </target>
1291 :    
1292 : jsr166 1.241 <target name="jsr166ejar" depends="jsr166ecompile">
1293 : jsr166 1.106 <jar destfile="${jsr166e.jar}" index="true">
1294 : jsr166 1.114 <fileset dir="${build.jsr166e.classes.dir}"/>
1295 : jsr166 1.178 <manifest>
1296 : jsr166 1.179 <attribute name="Built-By" value="${user.name}"/>
1297 :     <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
1298 : jsr166 1.178 </manifest>
1299 : dl 1.90 </jar>
1300 :     </target>
1301 :    
1302 : jsr166 1.241 <target name="jsr166edocs">
1303 : jsr166 1.127 <delete dir="${jsr166edocs.dir}"/>
1304 :     <mkdir dir="${jsr166edocs.dir}"/>
1305 : dl 1.90
1306 : jsr166 1.127 <javadoc destdir="${jsr166edocs.dir}"
1307 : jsr166 1.107 packagenames="jsr166e.*"
1308 : jsr166 1.152 link="${java.api.url}"
1309 : jsr166 1.130 access="${build.javadoc.access}"
1310 : jsr166 1.199 sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1311 : jsr166 1.144 source="${build.jsr166e.java.version}"
1312 : jsr166 1.206 executable="${javadoc7}"
1313 :     failonerror = "true">
1314 : jsr166 1.152 <arg line="-Xdocrootparent ${java.docroot.url}"/>
1315 : jsr166 1.118 <arg value="-XDignore.symbol.file=true"/>
1316 : jsr166 1.96 </javadoc>
1317 : dl 1.90 </target>
1318 :    
1319 : jsr166 1.241 <target name="jsr166e-tck-one-java-version" depends="jsr166ejar">
1320 : jsr166 1.144 <echo message="Testing with jdk${build.jsr166e.java.version} ..."/>
1321 : jsr166 1.122 <run-tck-tests
1322 :     tck.src.dir="${test.src.dir}/tck-jsr166e"
1323 : jsr166 1.144 target="${build.jsr166e.java.version}"
1324 : jsr166 1.122 workdir="${build.jsr166e.dir}"
1325 :     classes="${jsr166e.jar}"/>
1326 :     </target>
1327 :    
1328 : jsr166 1.241 <target name="jsr166e-tck">
1329 : jsr166 1.144
1330 :     <!-- <antcall target="clean"/> -->
1331 : jsr166 1.174 <!-- <antcall target="jsr166e-tck-one-java-version"> -->
1332 : jsr166 1.144 <!-- <param name="build.jsr166e.java.version" value="8"/> -->
1333 :     <!-- <param name="build.jsr166e.javac" value="${javac8}"/> -->
1334 :     <!-- </antcall> -->
1335 :    
1336 :     <antcall target="clean"/>
1337 : jsr166 1.174 <antcall target="jsr166e-tck-one-java-version">
1338 : jsr166 1.144 <param name="build.jsr166e.java.version" value="7"/>
1339 :     <param name="build.jsr166e.javac" value="${javac7}"/>
1340 :     </antcall>
1341 :    
1342 :     <antcall target="clean"/>
1343 : jsr166 1.174 <antcall target="jsr166e-tck-one-java-version">
1344 : jsr166 1.144 <param name="build.jsr166e.java.version" value="6"/>
1345 :     <param name="build.jsr166e.javac" value="${javac6}"/>
1346 :     </antcall>
1347 :     </target>
1348 :    
1349 : jsr166 1.241 <target name="jsr166e-test" depends="jsr166e-tck"/>
1350 : jsr166 1.122
1351 : jsr166 1.241 <target name="jsr166edist" depends="jsr166edist-jar, jsr166edist-docs"/>
1352 : jsr166 1.147
1353 : jsr166 1.241 <target name="jsr166eclean">
1354 : dl 1.90 <delete dir="${build.jsr166e.dir}"/>
1355 :     </target>
1356 :    
1357 :     <target name="jsr166edist-jar"
1358 : jsr166 1.128 depends="jsr166eclean, jsr166ejar">
1359 : jsr166 1.106 <copy file="${jsr166e.jar}" todir="${dist.dir}"/>
1360 : jsr166 1.125 </target>
1361 : dl 1.90
1362 : jsr166 1.241 <target name="jsr166edist-docs" depends="jsr166eclean, jsr166edocs">
1363 : jsr166 1.127 <mirror-dir src="${jsr166edocs.dir}" dst="${dist.jsr166edocs.dir}"/>
1364 : dl 1.90 </target>
1365 :    
1366 : jsr166 1.130
1367 :     <!-- Find buglets that can be detected by static build tools -->
1368 :    
1369 :     <target name="lint">
1370 :     <antcall target="dists">
1371 : jsr166 1.161 <param name="build.javadoc.access" value="public"/>
1372 :     </antcall>
1373 :     </target>
1374 :    
1375 :     <!-- Generates all doclint warnings, even for private methods (rarely useful) -->
1376 :     <target name="lint-private">
1377 :     <antcall target="dist">
1378 : jsr166 1.130 <param name="build.javadoc.access" value="private"/>
1379 :     </antcall>
1380 :     </target>
1381 :    
1382 : jsr166 1.236
1383 :     <!-- ==============================================================
1384 :     Experimental errorprone support - http://errorprone.info
1385 :     =================================================================== -->
1386 : jsr166 1.256 <property name="errorprone.jar" location="${lib.dir}/error_prone_ant-2.1.2.jar"/>
1387 : jsr166 1.236 <target name="errorprone"
1388 :     depends="clean, configure-compiler"
1389 : jsr166 1.241 description="Run errorprone over jsr166 source code (experimental)">
1390 : jsr166 1.236
1391 :     <local name="destdir"/>
1392 :     <property name="destdir" value="${build.classes.dir}/java.base"/>
1393 :     <mkdir dir="${destdir}"/>
1394 :    
1395 :     <javac srcdir="${src.dir}"
1396 :     destdir="${destdir}"
1397 :     debug="${build.debug}"
1398 :     debuglevel="${build.debuglevel}"
1399 :     deprecation="${build.deprecation}"
1400 :     classpath=""
1401 :     includeAntRuntime="false"
1402 :     includeJavaRuntime="false"
1403 :     encoding="ASCII"
1404 :     executable="${build.main.javac}"
1405 :     fork="true">
1406 :    
1407 :     <include name="**/*.java"/>
1408 : jsr166 1.254 <compilerarg line="-processorpath ${errorprone.jar}"/>
1409 : jsr166 1.236 <compilerarg value="-Xplugin:ErrorProne
1410 : jsr166 1.241 -Xep:IdentityBinaryExpression:WARN
1411 : jsr166 1.236 -Xep:MissingOverride:OFF
1412 : jsr166 1.256 -Xep:MixedArrayDimensions:ERROR
1413 : jsr166 1.241 -Xep:RemoveUnusedImports:ERROR
1414 : jsr166 1.242 -Xep:ClassName:ERROR
1415 :     -Xep:MultipleTopLevelClasses:ERROR
1416 :     -Xep:EmptyIf:ERROR
1417 :     -Xep:LongLiteralLowerCaseSuffix:ERROR
1418 :     -Xep:RedundantThrows:ERROR
1419 : jsr166 1.236 -Xep:MethodCanBeStatic:WARN"/>
1420 :     <compilerarg value="--patch-module=java.base=${src.dir}"/>
1421 :     <compilerarg value="-Xprefer:source"/>
1422 :     <compilerarg value="-XDignore.symbol.file=true"/>
1423 :     <compilerarg value="-Xlint:all"/>
1424 :     <compilerarg value="-Xdoclint:all/protected,reference/private"/>
1425 :     <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1426 :     <compilerarg line="${build.args}"/>
1427 :     </javac>
1428 :    
1429 :     <jar destfile="${product.jar}">
1430 :     <fileset dir="${destdir}"/>
1431 :     </jar>
1432 :    
1433 :     <run-tck-tests
1434 :     target="${build.main.java.version}"
1435 :     workdir="${build.dir}"
1436 :     classes="${product.jar}">
1437 :     <javac-elements>
1438 : jsr166 1.254 <compilerarg line="-processorpath ${errorprone.jar}"/>
1439 : jsr166 1.241 <compilerarg value="-Xplugin:ErrorProne
1440 :     -Xep:IdentityBinaryExpression:WARN
1441 :     -Xep:BoxedPrimitiveConstructor:OFF
1442 :     -Xep:HashtableContains:OFF
1443 :     -Xep:ModifyingCollectionWithItself:OFF
1444 :     -Xep:MissingOverride:OFF
1445 : jsr166 1.256 -Xep:MissingFail:OFF
1446 :     -Xep:JdkObsolete:OFF
1447 :     -Xep:MixedArrayDimensions:ERROR
1448 : jsr166 1.241 -Xep:RemoveUnusedImports:ERROR
1449 : jsr166 1.242 -Xep:ClassName:ERROR
1450 :     -Xep:MultipleTopLevelClasses:ERROR
1451 :     -Xep:EmptyIf:ERROR
1452 :     -Xep:LongLiteralLowerCaseSuffix:ERROR
1453 :     -Xep:RedundantThrows:ERROR
1454 : jsr166 1.236 -Xep:MethodCanBeStatic:WARN"/>
1455 :     <compilerarg line="-Xmaxerrs 3000 -Xmaxwarns 3000"/>
1456 :     </javac-elements>
1457 :     </run-tck-tests>
1458 :     </target>
1459 :    
1460 : jsr166 1.255 <!-- ant errorprone-jtreg |& grep -EA1 '(warning|error):' -->
1461 :     <target name="errorprone-jtreg"
1462 :     depends="jar"
1463 :     description="Run errorprone over jtreg tests (experimental)">
1464 :    
1465 :     <run-jtreg-tests
1466 :     target="${build.main.java.version}"
1467 :     workdir="${build.dir}"
1468 :     classes="${product.jar}"
1469 :     verbose="all">
1470 :     <jtreg-elements>
1471 :     <arg value="-javacoption:-processorpath"/>
1472 :     <arg value="-javacoption:${errorprone.jar}"/>
1473 :     <arg value="-javacoption:-Xplugin:ErrorProne
1474 :     -Xep:IdentityBinaryExpression:WARN
1475 :     -Xep:BoxedPrimitiveConstructor:OFF
1476 :     -Xep:HashtableContains:OFF
1477 :     -Xep:ModifyingCollectionWithItself:OFF
1478 :     -Xep:MissingOverride:OFF
1479 : jsr166 1.256 -Xep:JdkObsolete:OFF
1480 :     -Xep:NonAtomicVolatileUpdate:OFF
1481 :     -Xep:MixedArrayDimensions:ERROR
1482 : jsr166 1.255 -Xep:RemoveUnusedImports:ERROR
1483 :     -Xep:ClassName:ERROR
1484 :     -Xep:MultipleTopLevelClasses:ERROR
1485 :     -Xep:EmptyIf:ERROR
1486 :     -Xep:LongLiteralLowerCaseSuffix:ERROR
1487 :     -Xep:RedundantThrows:ERROR
1488 :     -Xep:MethodCanBeStatic:WARN"/>
1489 :     </jtreg-elements>
1490 :     </run-jtreg-tests>
1491 :     </target>
1492 :    
1493 : jsr166 1.236
1494 : jsr166 1.229 <!-- ==============================================================
1495 :     Running guava tests against jsr166 code
1496 :     =================================================================== -->
1497 :    
1498 :     <!-- <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" -->
1499 : jsr166 1.230 <!-- organisation="com.google.guava" module="guava-testlib" revision="21.0"/> -->
1500 :     <!-- <property name="guava.version" value="21.0"/> -->
1501 : jsr166 1.229
1502 :     <!-- HOWTO debug print a path id -->
1503 :     <!-- <pathconvert property="guava.testlib.classpath" refid="guava.testlib.classpath" /> -->
1504 :     <!-- <echo message="guava.testlib.classpath=${guava.testlib.classpath}"/> -->
1505 :    
1506 :     <!-- <ivy:retrieve pathid="guava.tests.classpath" type="jar" inline="true" conf="*" pattern="${lib.dir}/[type]/[artifact].[ext]" -->
1507 :     <!-- organisation="com.google.guava" module="guava-tests"/> -->
1508 :     <!-- <get src="http://repo2.maven.org/maven2/com/google/guava/guava-tests/${guava.version}/guava-tests-${guava.version}-tests.jar" -->
1509 :     <!-- dest="${lib.dir}/jar/guava-tests-tests.jar" usetimestamp="true"/> -->
1510 :     <!-- <ivy:cachepath pathid="lib.path.id" inline="true" conf="*" type="*" -->
1511 :     <!-- organisation="com.google.guava" module="guava-testlib" revision="${guava.version}"/> -->
1512 :    
1513 :     <!-- <test name="com.google.common.collect.testing.TestsForQueuesInJavaUtil"/> -->
1514 :     <!-- <test name="com.google.common.collect.testing.TestsForListsInJavaUtil"/> -->
1515 :     <!-- <test name="com.google.common.collect.testing.TestsForSetsInJavaUtil"/> -->
1516 :     <!-- <test name="com.google.common.collect.testing.TestsForMapsInJavaUtil"/> -->
1517 :    
1518 :     <!-- <ivy:retrieve pathid="guava.testlib.classpath" -->
1519 :     <!-- type="*" inline="true" conf="*(private),*(public)" -->
1520 :     <!-- pattern="${guava.dir}/[artifact].[ext]" -->
1521 :     <!-- organisation="com.google.guava" module="guava-testlib"/> -->
1522 :    
1523 :     <!-- Work around bug below by downloading guava-testlib-tests.jar "by hand": -->
1524 :     <!-- https://issues.apache.org/jira/browse/IVY-1444 -->
1525 :     <!-- maven tests artifacts cannot be downloaded because they are mapped to private configurations -->
1526 :    
1527 :     <target name="init-ivy">
1528 :     <get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar"
1529 :     dest="${build.dir}/ivy.jar" usetimestamp="true" skipexisting="true"/>
1530 :     <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant"
1531 :     classpath="${build.dir}/ivy.jar"/>
1532 :     </target>
1533 :    
1534 :     <target name="guava-tests" depends="jar, init-ivy"
1535 :     description="Guava tests run against jsr166 collections">
1536 :     <property name="guava.dir" value="${build.dir}/guava-testlib"/>
1537 :     <mkdir dir="${guava.dir}"/>
1538 :     <ivy:retrieve pathid="guava.testlib.classpath"
1539 :     type="jar,bundle" inline="true" conf="default,master"
1540 :     pattern="${guava.dir}/[artifact].[ext]"
1541 :     organisation="com.google.guava" module="guava-testlib"/>
1542 : jsr166 1.230 <property name="guava.version" value="21.0"/>
1543 : jsr166 1.229 <get src="http://repo2.maven.org/maven2/com/google/guava/guava-testlib/${guava.version}/guava-testlib-${guava.version}-tests.jar"
1544 :     dest="${guava.dir}/guava-testlib-tests.jar" usetimestamp="true"/>
1545 :     <junit printsummary="true" showoutput="true" haltonfailure="true"
1546 : jsr166 1.247 jvm="${build.main.java}" fork="true">
1547 : jsr166 1.252 <jvmarg line="-ea -esa --patch-module=java.base=${product.jar}"/>
1548 : jsr166 1.229 <formatter type="brief"/>
1549 :     <classpath>
1550 :     <pathelement location="${guava.dir}/guava-testlib-tests.jar"/>
1551 :     <path refid="guava.testlib.classpath"/>
1552 :     </classpath>
1553 :    
1554 :     <!-- "6" in "OpenJdk6Tests" misleadingly means "6+" -->
1555 :     <test name="com.google.common.collect.testing.OpenJdk6Tests"/>
1556 :     </junit>
1557 :     </target>
1558 : jsr166 1.130
1559 : tim 1.1 </project>

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8