ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/build.xml
(Generate patch)

Comparing jsr166/build.xml (file contents):
Revision 1.28 by tim, Wed May 28 13:37:59 2003 UTC vs.
Revision 1.89 by jsr166, Fri Jun 10 18:07:30 2011 UTC

# Line 1 | Line 1
1   <project name="jsr166" default="usage">
2  
3    <description>
4 <    Build file for JSR-166
4 > ------------------------------------------------------------------------------
5 >  Build file for JSR-166
6  
7 <    JUnit 3.8 or better must be in ${ant.home}/lib for the test target to work.
7 <  </description>
7 >  Usage: ant [target]
8  
9 +  User-specific settings are read from user.properties.
10 +  See user.properties.sample for an explanation of some useful settings.
11 + ------------------------------------------------------------------------------
12 +  </description>
13  
14 <  <target name="usage" description="Prints this message">
15 <    <echo>
12 < ant [target], where target is one of:
13 <
14 < usage       (default) Prints this message
15 < compile     Compiles all sources to build folder
16 < jar         Builds library jar from compiled sources
17 < test        Runs all tests (requires JUnit 1.8 in ${ant.home}/lib)
18 < docs        Builds javadocs with custom tags to build folder
19 < dist-docs   Builds javadocs without custom tags to dist folder
20 < dist        Puts all distributable products in single hierarchy
21 <
22 < clean       Removes all build products
23 < dist-clean  Removes all build and distribution products
24 <
25 < checkstyle  Reports on style errors in Java source (verbose, mostly chaff)
26 < doccheck    Reports on javadoc style errors (not working yet)
27 <    </echo>
14 >  <target name="usage" description="Advises user to run with -projecthelp">
15 >    <echo>Run "ant -projecthelp" for full usage information.</echo>
16    </target>
17  
18 +
19    <!-- User-specific settings -->
20    <property file="user.properties"/>
21  
33  <!-- Set build.warnings in user.properties to turn on -warnunchecked -->
34  <!-- <property name="build.warnings" value=""/> -->
35
22  
23    <!-- Compilation options -->
24 <  <property name="build.sourcelevel"    value="1.5"/>
39 <  <property name="build.docsourcelevel" value="1.4"/>
24 >  <property name="build.sourcelevel"    value="1.6"/>
25    <property name="build.debug"          value="true"/>
26    <property name="build.debuglevel"     value="source,lines,vars"/>
27    <property name="build.deprecation"    value="false"/>
28  
29    <!-- Build locations -->
30 <  <property name="build.dir"            location="build"/>
31 <  <property name="build.classes.dir"    location="${build.dir}/classes"/>
32 <  <property name="build.emulation.dir"  location="${build.dir}/emulation"/>
33 <  <property name="build.testcases.dir"  location="${build.dir}/testcases"/>
34 <  <property name="build.lib.dir"        location="${build.dir}/lib"/>
35 <  <property name="build.ant.dir"        location="${build.dir}/ant"/>
36 <  <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>
37 <  <property name="build.stripped.dir"   location="${build.dir}/stripped"/>
38 <  <property name="build.reports.dir"    location="${build.dir}/reports"/>
39 <  <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>
40 <  <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>
30 >  <property name="build.dir"                   location="build"/>
31 >  <property name="build.classes.dir"           location="${build.dir}/classes"/>
32 >  <property name="build.testcases.dir"         location="${build.dir}/testcases"/>
33 >  <property name="build.loops.dir"             location="${build.dir}/loops"/>
34 >  <property name="build.lib.dir"               location="${build.dir}/lib"/>
35 >  <property name="build.javadocs.dir"          location="${build.dir}/javadocs"/>
36 >  <property name="build.reports.dir"           location="${build.dir}/reports"/>
37 >  <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>
38 >  <property name="build.jsr166xlib.dir"        location="${build.dir}/jsr166xlib"/>
39 >  <property name="build.jsr166xjavadocs.dir"   location="${build.dir}/jsr166xjavadocs"/>
40 >
41 >  <property name="build.jsr166y.dir"           location="${build.dir}/jsr166y"/>
42 >  <property name="build.jsr166ylib.dir"        location="${build.dir}/jsr166ylib"/>
43 >  <property name="build.jsr166yjavadocs.dir"   location="${build.dir}/jsr166yjavadocs"/>
44 >
45 >  <property name="build.extra166y.dir"         location="${build.dir}/extra166y"/>
46 >  <property name="build.extra166ylib.dir"      location="${build.dir}/extra166ylib"/>
47 >  <property name="build.extra166yjavadocs.dir" location="${build.dir}/extra166yjavadocs"/>
48  
49    <!-- Source locations -->
50    <property name="src.dir"              location="${basedir}/src/main"/>
59  <property name="emulation.src.dir"    location="${basedir}/src/emulation"/>
51    <property name="test.src.dir"         location="${basedir}/src/test"/>
52 <  <property name="ant.src.dir"          location="${basedir}/etc/ant"/>
53 <  <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>
52 >  <property name="loops.src.dir"        location="${basedir}/src/loops"/>
53 >  <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
54 >  <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>
55    <property name="lib.dir"              location="${basedir}/lib"/>
56    <property name="dist.dir"             location="${basedir}/dist"/>
57 <
57 >  <property name="topsrc.dir"           location="${basedir}/src"/>
58 >  <property name="jsr166xsrc.dir"       location="${basedir}/src/jsr166x"/>
59 >  <property name="jsr166ysrc.dir"       location="${basedir}/src/jsr166y"/>
60 >  <property name="extra166ysrc.dir"     location="${basedir}/src/extra166y"/>
61 >  <property name="jdksrc.dir"           location="/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"/>
62    <!-- Distribution locations -->
63 <  <property name="dist.javadocs.dir"    location="${dist.dir}/docs"/>
63 >  <property name="dist.javadocs.dir"           location="${dist.dir}/docs"/>
64 >  <property name="dist.jsr166xjavadocs.dir"    location="${dist.dir}/jsr166xdocs"/>
65 >  <property name="dist.jsr166yjavadocs.dir"    location="${dist.dir}/jsr166ydocs"/>
66 >  <property name="dist.extra166yjavadocs.dir"  location="${dist.dir}/extra166ydocs"/>
67  
68    <!-- Jar locations -->
69    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
70 <  <property name="javac.jar"            location="${lib.dir}/javac.jar"/>
71 <  <property name="collect.jar"          location="${lib.dir}/collect.jar"/>
70 >  <property name="jsr166xproduct.jar"   location="${build.jsr166xlib.dir}/jsr166x.jar"/>
71 >  <property name="jsr166yproduct.jar"   location="${build.jsr166ylib.dir}/jsr166y.jar"/>
72 >  <property name="extra166yproduct.jar" location="${build.extra166ylib.dir}/extra166y.jar"/>
73    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
74  <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>
75
76
77
78  <!--
79   ! Bootclasspath munging for source compilation.
80   -->
81
82  <path id="javac.bootclasspath.prefix">
83    <!-- <pathelement location="${src.dir}"/> -->
84    <pathelement location="${javac.jar}"/>
85  </path>
86
87  <path id="javac.bootclasspath">
88    <!-- <pathelement location="${src.dir}"/> -->
89    <pathelement location="${collect.jar}"/>
90    <pathelement location="${rt.jar}"/>
91  </path>
92
93  <!-- Flatten bootclasspath prefix into a platform-appropriate string -->
94  <property name="javac.bootclasspath.prefix" refid="javac.bootclasspath.prefix"/>
95
96  <!-- Turn the flattened bootclasspath prefix into a javac argument -->
97  <property name="javac.args" value='-J-Xbootclasspath/p:${javac.bootclasspath.prefix}'/>
74  
75 +  <!-- Bootclasspath argument -->
76 +  <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>
77  
78 <
101 <  <!--
102 <   ! Bootclasspath munging for testing, so JUnit can test our local
103 <   ! modifications to java.*.
104 <   -->
105 <
78 >  <!-- Test classpath -->
79    <path id="test.classpath">
107    <pathelement location="${product.jar}"/>
80      <pathelement location="${build.testcases.dir}"/>
81      <pathelement location="${junit.jar}"/>
82    </path>
83  
84 <  <!-- Flatten test classpath into a platform-appropriate string -->
85 <  <property name="test.classpath" refid="test.classpath"/>
86 <
87 <  <!-- Turn the flattened test classpath into a javac argument -->
116 <  <property name="test.javac.args" value='-Xbootclasspath/p:${test.classpath}'/>
117 <
118 <
119 <
120 <  <!-- Files excluded from emulation and dist-docs -->
121 <  <patternset id="emulation.excludes">
122 <    <exclude name="java/util/Random.*"/>
123 <    <exclude name="sun/misc/Unsafe.*"/>
124 <  </patternset>
125 <
84 >  <!-- ALoops classpath -->
85 >  <path id="loops.classpath">
86 >    <pathelement location="${build.loops.dir}"/>
87 >  </path>
88  
89  
90    <!-- Main targets -->
91  
92 +  <target name="dists"
93 +          depends="dist, jsr166xdist, jsr166ydist, extra166ydist"
94 +          description="Builds all public jars and docs"/>
95 +
96    <target name="compile"
97 <          depends="init"
97 >          depends="init, configure-compiler"
98            description="Compiles main sources to build folder">
99  
100      <mkdir dir="${build.classes.dir}"/>
# Line 141 | Line 107 | ant [target], where target is one of:
107             source="${build.sourcelevel}"
108               fork="true">
109  
110 <      <bootclasspath refid="javac.bootclasspath"/>
111 <      <compilerarg line="${javac.args} ${build.warnings.option}"/>
110 >      <include name="**/*.java"/>
111 >      <compilerarg value="-XDignore.symbol.file=true"/>
112 >
113 > <!--
114 >      <exclude name="java/lang/**"/>
115 >      <compilerarg line="${build.args}"/>
116 >      <compilerarg line="-Xlint -Xmaxwarns 1000"/>
117 > -->
118  
119      </javac>
120  
121    </target>
122  
123  
152  <target name="jar"
153          depends="native-jar, emulation-jar"
154          description="Builds library jar from compiled sources"/>
155
156
157  <target name="test"
158          depends="init, check-junit, report-tests"
159          description="Runs all tests (requires JUnit 3.8+ in ${ant.home}/lib)" />
124  
125 +  <target name="jar"
126 +          depends="compile"
127 +          description="Builds library jar from compiled sources">
128  
129 <  <target name="checkstyle"
163 <          depends="filter-src"
164 <          description="Reports on style errors in Java source (verbose, mostly chaff)">
165 <
166 <    <taskdef resource="checkstyletask.properties"
167 <            classpath="${lib.dir}/checkstyle-all-2.4.jar"/>
129 >    <mkdir dir="${build.lib.dir}"/>
130  
131 <    <checkstyle>
132 <      <formatter type="plain"/>  <!-- also available: type="xml" -->
133 <      <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
172 <    </checkstyle>
131 >    <jar destfile="${product.jar}">
132 >      <fileset dir="${build.classes.dir}"/>
133 >    </jar>
134  
135    </target>
136  
137  
177  <target name="doccheck"
178          depends="filter-src"
179          description="Reports on javadoc style errors (not working yet)">
180
181    <delete dir="${build.doccheck.dir}"/>
182    <mkdir dir="${build.doccheck.dir}"/>
138  
139 <    <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
140 <         docletpath="${lib.dir}/doccheck.jar"
141 <            destdir="${build.doccheck.dir}">
187 <      <packageset dir="${build.filter.src.dir}"/>
188 <    </javadoc>
139 >  <target name="test"
140 >          depends="init, configure-tests, report-tests"
141 >          description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
142  
190  </target>
143  
144  
145    <target name="docs"
194          depends="filter-src"
146            description="Builds javadocs with custom tags to build folder">
147  
148      <delete dir="${build.javadocs.dir}"/>
149      <mkdir dir="${build.javadocs.dir}"/>
150  
151 <    <javadoc destdir="${build.javadocs.dir}"
152 <                link="http://java.sun.com/j2se/1.4.1/docs/api"
202 <            overview="${src.dir}/intro.html"
203 <              source="${build.docsourcelevel}">
204 <
205 <      <tag name="revised" description="Last revised:"/>
206 <      <tag name="spec" description="Specified by:"/>
207 <      <tag name="editor" description="Last edited by:"/>
208 <      <tag name="fixme" description="FIX ME:"/>
209 <      <packageset dir="${build.filter.src.dir}"/>
151 >    <!-- the packagenames="none" hack below prevents scanning the -->
152 >    <!-- sourcepath for packages -->
153  
154 +    <javadoc destdir="${build.javadocs.dir}"
155 +             packagenames="none"
156 +             link="http://download.oracle.com/javase/7/docs/api/"
157 +             overview="${src.dir}/intro.html"
158 +             sourcepath="${src.dir}:${jdksrc.dir}"
159 +             additionalparam="-XDignore.symbol.file=true" >
160 +      <fileset dir="${src.dir}" defaultexcludes="yes">
161 +      <include name="**/*.java"/>
162 +      </fileset>
163      </javadoc>
164  
165    </target>
166  
167  
216  <!--
217   # javac -s doesn't reliably generate compilable code. It generates
218   # bridge methods (marked as "synthetic") that can have identical
219   # signatures to existing methods except for the return value.
220   -->
221  <target name="strip"
222          depends="init">
168  
169 <    <mkdir dir="${build.stripped.dir}"/>
170 <
171 <    <javac srcdir="${src.dir}"
227 <          destdir="${build.stripped.dir}"
228 <            debug="${build.debug}"
229 <       debuglevel="${build.debuglevel}"
230 <      deprecation="${build.deprecation}"
231 <           source="${build.sourcelevel}"
232 <             fork="true">
169 >  <target name="dist"
170 >          depends="init, dist-clean, dist-jar, dist-docs"
171 >          description="Puts all distributable products in single hierarchy"/>
172  
234      <bootclasspath refid="javac.bootclasspath"/>
235      <compilerarg line="${javac.args} ${build.warnings.option} -s"/>
173  
174 <    </javac>
174 >  <target name="release"
175 >          depends="dist"
176 >          description="Puts entire CVS tree, plus distribution productions, in a jar">
177 >
178 >    <property name="release.jar" value="dist/jsr166-${version}-dist.jar"/>
179 >
180 >    <jar basedir="${basedir}" destfile="${release.jar}">
181 >      <!-- <exclude name="build/**"/> -->
182 >      <exclude name="${release.jar}"/>
183 >      <exclude name="user.properties"/>
184 >      <exclude name="etc/notes/**"/>
185 >      <exclude name="src/emulation/**"/>
186 >      <exclude name="**/SyntaxTest.java"/>
187 >      <exclude name="**/SuperfluousAbstract.java"/>
188 >    </jar>
189  
190    </target>
191  
192  
242  <target name="dist"
243          depends="init, dist-clean, dist-jar, dist-docs"
244          description="Puts all distributable products in single hierarchy"/>
245
193  
194    <target name="clean"
195            description="Removes all build products">
# Line 254 | Line 201 | ant [target], where target is one of:
201    </target>
202  
203  
204 +
205    <target name="dist-clean"
206            description="Removes all build and distribution products">
207  
# Line 262 | Line 210 | ant [target], where target is one of:
210    </target>
211  
212  
213 +
214    <target name="dist-docs"
266          depends="filter-src"
215            description="Builds javadocs without custom tags to dist folder">
216  
217      <delete dir="${dist.javadocs.dir}"/>
218      <mkdir dir="${dist.javadocs.dir}"/>
219  
220 <    <javadoc destdir="${dist.javadocs.dir}"
221 <                link="http://java.sun.com/j2se/1.4.1/docs/api"
274 <            overview="${src.dir}/intro.html"
275 <              source="${build.docsourcelevel}">
276 <
277 <      <packageset dir="${build.filter.src.dir}"/>
220 >    <!-- the packagenames="none" hack below prevents scanning the -->
221 >    <!-- sourcepath for packages -->
222  
223 +    <javadoc destdir="${dist.javadocs.dir}"
224 +             packagenames="none"
225 +             link="http://download.oracle.com/javase/7/docs/api/"
226 +             overview="${src.dir}/intro.html"
227 +             sourcepath="${src.dir}:${jdksrc.dir}"
228 +             additionalparam="-XDignore.symbol.file=true" >
229 +      <fileset dir="${src.dir}" defaultexcludes="yes">
230 +      <include name="**/*.java"/>
231 +      </fileset>
232      </javadoc>
233  
234    </target>
# Line 284 | Line 237 | ant [target], where target is one of:
237  
238    <!-- Internal targets -->
239  
287  <target name="set-warnings-if" if="build.warnings">
240  
241 <    <property name="build.warnings.option" value="-warnunchecked"/>
290 <
291 <  </target>
292 <
293 <
294 <  <target name="set-warnings-unless" unless="build.warnings">
295 <
296 <    <property name="build.warnings.option" value=""/>
297 <
298 <  </target>
299 <
300 <
301 <  <target name="init"
302 <          depends="set-warnings-if, set-warnings-unless">
241 >  <target name="init">
242  
243      <!-- Version is kept in a separate file -->
244      <loadfile property="version" srcFile="version.properties"/>
245      <echo>Building JSR-166 version ${version}</echo>
246 +    <echo>java.home is ${java.home}</echo>
247  
248    </target>
249  
250  
251 <  <target name="init-jar">
252 <
313 <    <mkdir dir="${build.lib.dir}"/>
314 <
315 <  </target>
316 <
317 <
318 <  <target name="native-jar"
319 <          depends="compile, init-jar"
320 <          unless="build.emulation">
321 <
322 <    <jar destfile="${product.jar}">
323 <      <fileset dir="${build.classes.dir}"/>
324 <    </jar>
325 <
326 <  </target>
327 <
328 <
329 <  <target name="base-jar"
330 <          depends="compile, init-jar">
251 >  <target name="dist-jar"
252 >          depends="clean, jar">
253  
254 <    <jar destfile="${product.jar}">
333 <      <fileset dir="${build.classes.dir}">
334 <        <patternset refid="emulation.excludes"/>
335 <      </fileset>
336 <    </jar>
254 >    <copy file="${product.jar}" todir="${dist.dir}"/>
255  
256    </target>
257  
258  
259 <  <target name="compile-emulation"
260 <          depends="init"
343 <          if="build.emulation">
259 >  <target name="compile-tests"
260 >          depends="jar">
261  
262 <    <mkdir dir="${build.emulation.dir}"/>
262 >    <mkdir dir="${build.testcases.dir}"/>
263  
264 <    <javac srcdir="${emulation.src.dir}"
265 <          destdir="${build.emulation.dir}"
264 >    <javac srcdir="${tck.src.dir}"
265 >          destdir="${build.testcases.dir}"
266              debug="${build.debug}"
267         debuglevel="${build.debuglevel}"
268        deprecation="${build.deprecation}"
269             source="${build.sourcelevel}"
270               fork="true">
271  
272 <      <bootclasspath refid="javac.bootclasspath"/>
273 <      <compilerarg line="${javac.args} ${build.warnings.option}"/>
274 <
358 <    </javac>
359 <
360 <  </target>
272 >      <compilerarg value="${bootclasspath.args}"/>
273 >      <compilerarg line="${build.args}"/>
274 >      <compilerarg value="-XDignore.symbol.file=true"/>
275  
276 +      <classpath refid="test.classpath"/>
277  
278 <  <target name="emulation-jar"
364 <          depends="base-jar, compile-emulation"
365 <          if="build.emulation">
366 <
367 <    <jar destfile="${product.jar}" update="true" duplicate="add">
368 <      <fileset dir="${build.emulation.dir}"/>
369 <    </jar>
370 <
371 <  </target>
372 <
373 <
374 <  <target name="dist-jar"
375 <          depends="clean, jar">
376 <
377 <    <copy file="${product.jar}" todir="${dist.dir}"/>
378 <
379 <  </target>
380 <
381 <
382 <  <target name="compile-ant-filter"
383 <          depends="init">
384 <
385 <    <mkdir dir="${build.ant.dir}"/>
386 <
387 <    <javac srcdir="${ant.src.dir}"
388 <          destdir="${build.ant.dir}"
389 <           source="1.4"
390 <    />
391 <
392 <  </target>
393 <
394 <
395 <  <target name="filter-src"
396 <          depends="compile-ant-filter">
397 <
398 <    <mkdir dir="${build.filter.src.dir}"/>
278 >    </javac>
279  
280 <    <copy todir="${build.filter.src.dir}">
281 <      <fileset dir="${src.dir}">
282 <        <patternset refid="emulation.excludes"/>
283 <      </fileset>
284 <      <filterchain>
285 <        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
286 <                      classpath="${build.ant.dir}">
407 <          <!--
408 <           # These arguments are to get rid of angle-bracketed type
409 <           # parameters so that javadoc can run on the result. The
410 <           # following heuristic that seems to work:
411 <           #
412 <           # For all lines not starting with space(s)-asterisk-space(s),
413 <           #   replace <something> with a space, where there may be more
414 <           #   than one right angle bracket at the end, and "something"
415 <           #   must not contain parens or pipes. (This may need some
416 <           #   tweaking.)
417 <           -->
418 <          <param name="notmatching" value="^\s+\*\s.*$"/>
419 <          <param name="pattern" value="&lt;[^|>()]+?>+"/>
420 <          <param name="replacement" value=" "/>
421 <        </filterreader>
422 <        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
423 <                      classpath="${build.ant.dir}">
424 <          <!--
425 <           # These arguments are to uncomment lines beginning with
426 <           # "//@" so that javadoc can see imports that are needed
427 <           # to resolve links but that shouldn't be in the compiled
428 <           # code.
429 <           -->
430 <          <param name="matching" value="^//@.*$"/>
431 <          <param name="pattern" value="^//@"/>
432 <          <param name="replacement" value=""/>
433 <        </filterreader>
434 <      </filterchain>
435 <    </copy>
280 >    <javac srcdir="${test.src.dir}"
281 >          destdir="${build.testcases.dir}"
282 >            debug="${build.debug}"
283 >       debuglevel="${build.debuglevel}"
284 >      deprecation="${build.deprecation}"
285 >           source="${build.sourcelevel}"
286 >             fork="true">
287  
288 <  </target>
288 >      <include name="jsr166/test/**"/>
289  
290 +      <compilerarg value="${bootclasspath.args}"/>
291 +      <compilerarg line="${build.args}"/>
292 +      <compilerarg value="-XDignore.symbol.file=true"/>
293  
294 <  <target name="compile-tests"
441 <          depends="jar">
294 >      <classpath refid="test.classpath"/>
295  
296 <    <mkdir dir="${build.testcases.dir}"/>
296 >    </javac>
297  
298 <    <javac srcdir="${test.src.dir}"
298 > <!--
299 >    <javac srcdir="${jtreg.src.dir}"
300            destdir="${build.testcases.dir}"
301              debug="${build.debug}"
302         debuglevel="${build.debuglevel}"
# Line 450 | Line 304 | ant [target], where target is one of:
304             source="${build.sourcelevel}"
305               fork="true">
306  
307 <      <bootclasspath refid="javac.bootclasspath"/>
308 <      <compilerarg line="${javac.args} ${build.warnings.option}"/>
307 >      <compilerarg value="${bootclasspath.args}"/>
308 >      <compilerarg line="${build.args}"/>
309 >      <compilerarg value="-XDignore.symbol.file=true"/>
310 >
311        <classpath refid="test.classpath"/>
312  
313      </javac>
314 + -->
315  
316    </target>
317  
# Line 474 | Line 331 | ant [target], where target is one of:
331                      dir="${build.reports.dir}"
332                     fork="true">
333  
334 <      <jvmarg value="${test.javac.args}"/>
334 >      <jvmarg value="${bootclasspath.args}"/>
335 >      <jvmarg value="-server"/>
336 >      <jvmarg value="-showversion"/>
337 >
338 >      <classpath refid="test.classpath"/>
339  
340        <formatter type="xml"/>
341  
342 <      <batchtest todir="${build.reports.dir}">
342 >      <batchtest todir="${build.reports.dir}" unless="no.test.tck">
343 >        <fileset dir="${tck.src.dir}">
344 >          <include name="**/${testcase}Test.java"/>
345 >        </fileset>
346 >      </batchtest>
347 >
348 >      <batchtest todir="${build.reports.dir}" if="do.test.old">
349          <fileset dir="${test.src.dir}">
350 +          <include name="jsr166/test/**/${testcase}Test.java"/>
351 +        </fileset>
352 +      </batchtest>
353 +
354 + <!--
355 +      <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
356 +        <fileset dir="${jtreg.src.dir}">
357            <include name="**/${testcase}Test.java"/>
358          </fileset>
359        </batchtest>
360 + -->
361  
362      </junit>
363  
# Line 492 | Line 367 | ant [target], where target is one of:
367    <target name="report-tests"
368            depends="run-tests">
369  
370 <    <!-- Sets junit.report.format to frames if Xalan is present,
370 >    <!-- Sets junit.report.format to frames if redirection is present,
371           otherwise sets it to noframes. -->
372      <available property="junit.report.format"
373                    value="frames"
# Line 504 | Line 379 | ant [target], where target is one of:
379        <fileset dir="${build.reports.dir}">
380          <include name="TEST-*.xml"/>
381        </fileset>
382 <      <report styledir="${stylesheet.dir}"
508 <                format="${junit.report.format}"
509 <                 todir="${build.reports.dir}"
382 >      <report format="${junit.report.format}" todir="${build.reports.dir}"
383        />
384      </junitreport>
385  
# Line 515 | Line 388 | ant [target], where target is one of:
388    </target>
389  
390  
391 <  <target name="check-junit">
391 >  <target name="configure-compiler">
392 >
393 >    <property name="unchecked.option" value="-Xlint:unchecked"/>
394 >
395 >    <condition property="warnunchecked.arg" value="${unchecked.option}">
396 >      <istrue value="${build.warnunchecked}"/>
397 >    </condition>
398 >
399 >    <property name="warnunchecked.arg" value=""/>
400 >
401 >
402 >    <!-- Common options in javac invocations -->
403 >    <property name="build.args" value="${warnunchecked.arg}"/>
404 >
405 >  </target>
406 >
407 >
408 >  <target name="configure-tests"
409 >       depends="configure-compiler">
410  
411      <!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 -->
412      <available property="junit.available"
413                 classname="junit.framework.Protectable"/>
414  
415 +    <!-- Xalan -->
416 +    <available property="xalan.available"
417 +               classname="org.apache.xalan.Version"/>
418 +
419 +
420 +    <!-- Ant 1.6beta and later don't need or want this check -->
421 +    <!--
422      <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
423            unless="junit.available"/>
424  
425 +    <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"
426 +          unless="xalan.available"/>
427 +    -->
428 +
429 +  </target>
430 +
431 +
432 +  <!-- Various demos and test programs -->
433 +
434 +
435 +  <target name="loops" depends="init, configure-compiler"
436 +          description="Benchmark from Doug Lea's AQS paper">
437 +
438 +    <mkdir dir="${build.loops.dir}"/>
439 +
440 +    <javac srcdir="${loops.src.dir}"
441 +          destdir="${build.loops.dir}"
442 +            debug="${build.debug}"
443 +       debuglevel="${build.debuglevel}"
444 +      deprecation="${build.deprecation}"
445 +           source="${build.sourcelevel}"
446 +             fork="true">
447 +
448 +      <compilerarg line="${build.args}"/>
449 +      <classpath refid="loops.classpath"/>
450 +      <compilerarg value="-XDignore.symbol.file=true"/>
451 +
452 +    </javac>
453 +
454 +    <java classname="ALoops" fork="true">
455 +      <classpath refid="loops.classpath"/>
456 +    </java>
457 +
458 +  </target>
459 +
460 +
461 +  <!-- jsr166x -->
462 +
463 +
464 +  <target name="jsr166xcompile"
465 +          depends="init, configure-compiler"
466 +          description="Compiles jsr166x sources">
467 +
468 +    <mkdir dir="${build.jsr166x.dir}"/>
469 +
470 +    <javac srcdir="${jsr166xsrc.dir}"
471 +          destdir="${build.jsr166x.dir}"
472 +            debug="${build.debug}"
473 +       debuglevel="${build.debuglevel}"
474 +      deprecation="${build.deprecation}"
475 +           source="${build.sourcelevel}"
476 +             fork="true">
477 +
478 +      <include name="**/*.java"/>
479 +      <compilerarg line="${build.args}"/>
480 +      <compilerarg value="-XDignore.symbol.file=true"/>
481 +
482 +    </javac>
483 +
484 +  </target>
485 +
486 +
487 +
488 +  <target name="jsr166xjar"
489 +          depends="jsr166xcompile"
490 +          description="Builds library jar from compiled sources">
491 +
492 +    <mkdir dir="${build.jsr166xlib.dir}"/>
493 +
494 +    <jar destfile="${jsr166xproduct.jar}">
495 +      <fileset dir="${build.jsr166x.dir}"/>
496 +    </jar>
497 +
498 +  </target>
499 +
500 +
501 +
502 +  <target name="jsr166xdocs"
503 +          description="Builds javadocs with custom tags to build folder">
504 +
505 +    <delete dir="${build.jsr166xjavadocs.dir}"/>
506 +    <mkdir dir="${build.jsr166xjavadocs.dir}"/>
507 +
508 +    <javadoc destdir="${build.jsr166xjavadocs.dir}"
509 +             packagenames="jsr166x"
510 +             link="http://download.oracle.com/javase/7/docs/api/"
511 +             source="${build.sourcelevel}"
512 +             sourcepath="${topsrc.dir}:${jdksrc.dir}"
513 +             additionalparam="-XDignore.symbol.file=true" />
514 +
515 +  </target>
516 +
517 +
518 +  <target name="jsr166xdist"
519 +          depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs"
520 +          description="Puts all distributable products in single hierarchy"/>
521 +
522 +
523 +
524 +  <target name="jsr166xclean"
525 +          description="Removes all build products">
526 +
527 +    <delete dir="${build.jsr166x.dir}"/>
528 +    <delete dir="${build.jsr166xlib.dir}"/>
529 +
530    </target>
531  
532  
533  
534 <  <!-- Anthill targets -->
534 >  <target name="jsr166xdist-clean"
535 >          description="Removes all build and distribution products">
536 >
537 >  </target>
538 >
539 >
540  
541 <  <target name="anthill-build"
542 <          depends="jar, test, docs, dist-docs"/>
541 >  <target name="jsr166xdist-docs"
542 >          description="Builds javadocs without custom tags to dist folder">
543  
544 <  <target name="anthill-publish">
544 >    <delete dir="${dist.jsr166xjavadocs.dir}"/>
545 >    <mkdir dir="${dist.jsr166xjavadocs.dir}"/>
546  
547 <    <copy todir="${deployDir}/docs/private">
548 <      <fileset dir="${build.javadocs.dir}"/>
549 <    </copy>
547 >    <javadoc destdir="${dist.jsr166xjavadocs.dir}"
548 >             packagenames="jsr166x"
549 >             link="http://download.oracle.com/javase/7/docs/api/"
550 >             source="${build.sourcelevel}"
551 >             sourcepath="${topsrc.dir}:${jdksrc.dir}"
552 >             additionalparam="-XDignore.symbol.file=true" />
553  
554 <    <copy todir="${deployDir}/docs/public">
543 <      <fileset dir="${dist.javadocs.dir}"/>
544 <    </copy>
554 >  </target>
555  
556 <    <copy tofile="${deployDir}/index.html"
557 <          file="${basedir}/etc/anthill-index.html"/>
556 >  <target name="jsr166xdist-jar"
557 >          depends="jsr166xclean, jsr166xjar">
558  
559 <    <copy todir="${deployDir}/notes">
550 <      <fileset dir="${basedir}/etc/notes"/>
551 <    </copy>
559 >    <copy file="${jsr166xproduct.jar}" todir="${dist.dir}"/>
560  
561    </target>
562  
563 +  <!-- jsr166y -->
564 +
565 +
566 +  <target name="jsr166ycompile"
567 +          depends="init, configure-compiler"
568 +          description="Compiles jsr166y sources">
569 +
570 +    <mkdir dir="${build.jsr166y.dir}"/>
571 +
572 +    <javac srcdir="${jsr166ysrc.dir}"
573 +          destdir="${build.jsr166y.dir}"
574 +            debug="${build.debug}"
575 +       debuglevel="${build.debuglevel}"
576 +      deprecation="${build.deprecation}"
577 +           source="${build.sourcelevel}"
578 +             fork="true">
579 +
580 +      <include name="**/*.java"/>
581 +      <compilerarg line="${build.args}"/>
582 +      <compilerarg value="-XDignore.symbol.file=true"/>
583 +      <compilerarg value="${bootclasspath.args}"/>
584 +
585 + <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
586 +
587 +    </javac>
588 +
589 +  </target>
590 +
591 +
592 +
593 +  <target name="jsr166yjar"
594 +          depends="jsr166ycompile"
595 +          description="Builds library jar from compiled sources">
596 +
597 +    <mkdir dir="${build.jsr166ylib.dir}"/>
598 +
599 +    <jar destfile="${jsr166yproduct.jar}" index="true">
600 +      <fileset dir="${build.jsr166y.dir}"/>
601 +    </jar>
602 +
603 +  </target>
604 +
605 +
606 +
607 +  <target name="jsr166ydocs"
608 +          description="Builds javadocs with custom tags to build folder">
609 +
610 +    <delete dir="${build.jsr166yjavadocs.dir}"/>
611 +    <mkdir dir="${build.jsr166yjavadocs.dir}"/>
612 +
613 +    <javadoc destdir="${build.jsr166yjavadocs.dir}"
614 +             packagenames="jsr166y"
615 +             link="http://download.oracle.com/javase/7/docs/api/"
616 +             source="${build.sourcelevel}"
617 +             sourcepath="${topsrc.dir}:${jdksrc.dir}"
618 +             additionalparam="-XDignore.symbol.file=true" />
619 +
620 +  </target>
621 +
622 +
623 +  <target name="jsr166ydist"
624 +          depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydist-docs"
625 +          description="Puts all distributable products in single hierarchy"/>
626 +
627 +
628 +
629 +  <target name="jsr166yclean"
630 +          description="Removes all build products">
631 +
632 +    <delete dir="${build.jsr166y.dir}"/>
633 +    <delete dir="${build.jsr166ylib.dir}"/>
634 +
635 +  </target>
636 +
637 +
638 +
639 +  <target name="jsr166ydist-clean"
640 +          description="Removes all build and distribution products">
641 +
642 +  </target>
643 +
644 +  <target name="jsr166ydist-docs"
645 +          description="Builds javadocs without custom tags to dist folder">
646 +
647 +    <delete dir="${dist.jsr166yjavadocs.dir}"/>
648 +    <mkdir dir="${dist.jsr166yjavadocs.dir}"/>
649 +
650 +    <javadoc destdir="${dist.jsr166yjavadocs.dir}"
651 +             packagenames="jsr166y"
652 +             link="http://download.oracle.com/javase/7/docs/api/"
653 +             source="${build.sourcelevel}"
654 +             sourcepath="${topsrc.dir}:${jdksrc.dir}"
655 +             additionalparam="-XDignore.symbol.file=true" />
656 +
657 +  </target>
658 +
659 +  <target name="jsr166ydist-jar"
660 +          depends="jsr166yclean, jsr166yjar">
661 +
662 +    <copy file="${jsr166yproduct.jar}" todir="${dist.dir}"/>
663 +
664 +  </target>
665 +
666 +  <!-- extra166y -->
667 +
668 +
669 +  <target name="extra166ycompile"
670 +          depends="init, configure-compiler, jsr166ycompile"
671 +          description="Compiles extra166y sources">
672 +
673 +    <mkdir dir="${build.extra166y.dir}"/>
674 +
675 +    <javac srcdir="${extra166ysrc.dir}"
676 +          destdir="${build.extra166y.dir}"
677 +            debug="${build.debug}"
678 +            classpath="${jsr166yproduct.jar}"
679 +       debuglevel="${build.debuglevel}"
680 +      deprecation="${build.deprecation}"
681 +           source="${build.sourcelevel}"
682 +             fork="true">
683 +
684 +      <include name="**/*.java"/>
685 +      <compilerarg line="${build.args}"/>
686 +      <compilerarg value="-XDignore.symbol.file=true"/>
687 +      <compilerarg value="${bootclasspath.args}"/>
688 +
689 + <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
690 +
691 +    </javac>
692 +
693 +  </target>
694 +
695 +
696 +
697 +  <target name="extra166yjar"
698 +          depends="extra166ycompile"
699 +          description="Builds library jar from compiled sources">
700 +
701 +    <mkdir dir="${build.extra166ylib.dir}"/>
702 +
703 +    <jar destfile="${extra166yproduct.jar}" index="true">
704 +      <fileset dir="${build.extra166y.dir}"/>
705 +    </jar>
706 +
707 +  </target>
708 +
709 +
710 +
711 +  <target name="extra166ydocs"
712 +          description="Builds javadocs with custom tags to build folder">
713 +
714 +    <delete dir="${build.extra166yjavadocs.dir}"/>
715 +    <mkdir dir="${build.extra166yjavadocs.dir}"/>
716 +
717 +    <javadoc destdir="${build.extra166yjavadocs.dir}"
718 +             packagenames="extra166y"
719 +             link="http://download.oracle.com/javase/7/docs/api/"
720 +             source="${build.sourcelevel}"
721 +             sourcepath="${topsrc.dir}:${jdksrc.dir}"
722 +             additionalparam="-XDignore.symbol.file=true" />
723 +
724 +  </target>
725 +
726 +
727 +  <target name="extra166ydist"
728 +          depends="extra166ydist-clean, extra166ydist-jar, extra166ydist-docs"
729 +          description="Puts all distributable products in single hierarchy"/>
730 +
731 +
732 +
733 +  <target name="extra166yclean"
734 +          description="Removes all build products">
735 +
736 +    <delete dir="${build.extra166y.dir}"/>
737 +    <delete dir="${build.extra166ylib.dir}"/>
738 +
739 +  </target>
740 +
741 +
742 +
743 +  <target name="extra166ydist-clean"
744 +          description="Removes all build and distribution products">
745 +
746 +  </target>
747 +
748 +  <target name="extra166ydist-docs"
749 +          description="Builds javadocs without custom tags to dist folder">
750 +
751 +    <delete dir="${dist.extra166yjavadocs.dir}"/>
752 +    <mkdir dir="${dist.extra166yjavadocs.dir}"/>
753 +
754 +    <javadoc destdir="${dist.extra166yjavadocs.dir}"
755 +             packagenames="extra166y"
756 +             link="http://download.oracle.com/javase/7/docs/api/"
757 +             source="${build.sourcelevel}"
758 +             sourcepath="${topsrc.dir}:${jdksrc.dir}"
759 +             additionalparam="-XDignore.symbol.file=true" />
760 +
761 +  </target>
762 +
763 +  <target name="extra166ydist-jar"
764 +          depends="extra166yclean, extra166yjar">
765 +
766 +    <copy file="${extra166yproduct.jar}" todir="${dist.dir}"/>
767 +
768 +  </target>
769  
770   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines