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

Annotation of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.267 - (hide annotations)
Tue Feb 27 21:18:06 2018 UTC (21 months, 2 weeks ago) by jsr166
Branch: MAIN
Changes since 1.266: +3 -1 lines
File MIME type: text/xml
add property errorprone.jsr166.user.flags

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

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