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

Annotation of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.237 - (hide annotations)
Fri Mar 24 15:57:26 2017 UTC (2 years, 6 months ago) by jsr166
Branch: MAIN
Changes since 1.236: +1 -3 lines
File MIME type: text/xml
whitespace

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

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