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

Annotation of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


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

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

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8