39 |
|
<property name="build.reports.dir" location="${build.dir}/reports"/> |
40 |
|
<property name="build.doccheck.dir" location="${build.dir}/doccheck"/> |
41 |
|
<property name="build.filter.src.dir" location="${build.dir}/filtersrc"/> |
42 |
+ |
<property name="build.filter.doccheck.dir" location="${build.dir}/filterdocchk"/> |
43 |
|
|
44 |
|
<!-- Source locations --> |
45 |
|
<property name="src.dir" location="${basedir}/src/main"/> |
60 |
|
|
61 |
|
|
62 |
|
|
63 |
< |
<!-- Files excluded from emulation and dist-docs --> |
64 |
< |
<patternset id="emulation.excludes"> |
63 |
> |
<!-- Files excluded from dist-docs and emulation jar --> |
64 |
> |
<patternset id="unsafe.exclusion"> |
65 |
|
<exclude name="java/util/Random.*"/> |
66 |
|
<exclude name="sun/misc/Unsafe.*"/> |
67 |
|
</patternset> |
68 |
|
|
69 |
+ |
<!-- Files excludes from emulation jar --> |
70 |
+ |
<patternset id="atomic.exclusion"> |
71 |
+ |
<exclude name="java/util/concurrent/atomic/AtomicBoolean*"/> |
72 |
+ |
<exclude name="java/util/concurrent/atomic/AtomicInteger*"/> |
73 |
+ |
<exclude name="java/util/concurrent/atomic/AtomicLong*"/> |
74 |
+ |
<exclude name="java/util/concurrent/atomic/AtomicReference*"/> |
75 |
+ |
</patternset> |
76 |
+ |
|
77 |
|
|
78 |
|
|
79 |
|
<!-- Main targets --> |
133 |
|
|
134 |
|
|
135 |
|
<target name="doccheck" |
136 |
< |
depends="filter-src" |
137 |
< |
description="Reports on javadoc style errors (not working yet)"> |
136 |
> |
depends="filter-doccheck" |
137 |
> |
description="Reports on javadoc style errors"> |
138 |
|
|
139 |
|
<delete dir="${build.doccheck.dir}"/> |
140 |
|
<mkdir dir="${build.doccheck.dir}"/> |
142 |
|
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
143 |
|
docletpath="${lib.dir}/doccheck.jar" |
144 |
|
destdir="${build.doccheck.dir}"> |
145 |
< |
<packageset dir="${build.filter.src.dir}"/> |
145 |
> |
<packageset dir="${build.filter.doccheck.dir}"/> |
146 |
|
</javadoc> |
147 |
|
|
148 |
|
</target> |
203 |
|
depends="init, dist-clean, dist-jar, dist-docs" |
204 |
|
description="Puts all distributable products in single hierarchy"/> |
205 |
|
|
206 |
+ |
<target name="release" |
207 |
+ |
depends="dist" |
208 |
+ |
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
209 |
+ |
|
210 |
+ |
<!-- |
211 |
+ |
#keep build dir? - dl |
212 |
+ |
<delete dir="${build.dir}"/> |
213 |
+ |
--> |
214 |
+ |
<property name="release.jar" value="dist/jsr166-${version}-dist.jar"/> |
215 |
+ |
|
216 |
+ |
<jar basedir="${basedir}" destfile="${release.jar}"> |
217 |
+ |
<exclude name="${release.jar}"/> |
218 |
+ |
<exclude name="user.properties"/> |
219 |
+ |
<exclude name="etc/notes/**"/> |
220 |
+ |
<exclude name="lib/gjc/2.1/**"/> |
221 |
+ |
<exclude name="**/SyntaxTest.java"/> |
222 |
+ |
</jar> |
223 |
+ |
|
224 |
+ |
</target> |
225 |
|
|
226 |
|
<target name="clean" |
227 |
|
description="Removes all build products"> |
320 |
|
|
321 |
|
<jar destfile="${product.jar}" duplicate="add"> |
322 |
|
<fileset dir="${build.classes.dir}"> |
323 |
< |
<patternset refid="emulation.excludes"/> |
323 |
> |
<patternset refid="atomic.exclusion"/> |
324 |
> |
<patternset refid="unsafe.exclusion"/> |
325 |
|
</fileset> |
326 |
|
<fileset dir="${build.emulation.dir}"/> |
327 |
|
</jar> |
361 |
|
</fileset> |
362 |
|
</copy> |
363 |
|
|
335 |
– |
<!-- Not needed now, used for doccheck filtering: |
336 |
– |
<property name="generic.declarations" |
337 |
– |
value="public interface E {} public interface T {} public interface K {} public interface V {}" |
338 |
– |
/> |
339 |
– |
--> |
340 |
– |
|
364 |
|
<copy todir="${build.filter.src.dir}"> |
365 |
|
<fileset dir="${src.dir}"> |
366 |
|
<exclude name="**/*.html"/> |
367 |
< |
<patternset refid="emulation.excludes"/> |
367 |
> |
<patternset refid="unsafe.exclusion"/> |
368 |
|
</fileset> |
369 |
|
<filterchain> |
370 |
|
|
400 |
|
<param name="pattern" value="^//@"/> |
401 |
|
<param name="replacement" value=""/> |
402 |
|
</filterreader> |
403 |
+ |
</filterchain> |
404 |
+ |
</copy> |
405 |
+ |
|
406 |
+ |
</target> |
407 |
+ |
|
408 |
+ |
|
409 |
|
|
410 |
|
|
411 |
+ |
<target name="filter-doccheck" |
412 |
+ |
depends="filter-src"> |
413 |
+ |
|
414 |
+ |
<mkdir dir="${build.filter.doccheck.dir}"/> |
415 |
+ |
|
416 |
+ |
<copy todir="${build.filter.doccheck.dir}"> |
417 |
+ |
<fileset dir="${build.filter.src.dir}"> |
418 |
+ |
<include name="**/*.html"/> |
419 |
+ |
</fileset> |
420 |
+ |
</copy> |
421 |
+ |
|
422 |
+ |
<property name="generic.declarations" |
423 |
+ |
value="/** Fake type parameter. */ public interface E {} /** Fake type parameter. */ public interface T {} /** Fake type parameter. */ public interface K {} /** Fake type parameter. */ public interface V {}" |
424 |
+ |
/> |
425 |
+ |
|
426 |
+ |
<copy todir="${build.filter.doccheck.dir}"> |
427 |
+ |
<fileset dir="${build.filter.src.dir}"> |
428 |
+ |
<exclude name="**/*.html"/> |
429 |
+ |
</fileset> |
430 |
+ |
<filterchain> |
431 |
|
<!-- |
432 |
< |
# The next two filters try to make the source look like |
432 |
> |
# These two filters try to make the source look like |
433 |
|
# something that doccheck can process. The first removes |
434 |
|
# -source 1.4 assertions and the second adds in a bunch |
435 |
|
# of single letter public nested marker interfaces so that |
436 |
|
# the generic type parameters are recognized. |
388 |
– |
# |
389 |
– |
# Currently commented out because doccheck doesn't work. :-( |
437 |
|
--> |
438 |
|
|
392 |
– |
<!-- |
439 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
440 |
|
classpath="${build.ant.dir}"> |
441 |
|
<param name="matching" value="^\s*assert[\s ].*$"/> |
445 |
|
|
446 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
447 |
|
classpath="${build.ant.dir}"> |
448 |
< |
<param name="matching" value="^(.*(class|interface|implements) .*|)\{.*$"/> |
448 |
> |
<param name="matching" value="^([^*]*(class|interface|implements) .*|)\{.*$"/> |
449 |
|
<param name="pattern" value="$"/> |
450 |
|
<param name="replacement" value=" ${generic.declarations}"/> |
451 |
|
</filterreader> |
406 |
– |
--> |
452 |
|
|
453 |
|
</filterchain> |
454 |
|
</copy> |
543 |
|
<target name="configure-compiler"> |
544 |
|
|
545 |
|
<property name="gjc.version" |
546 |
< |
value="2.0"/> |
546 |
> |
value="2.2"/> |
547 |
|
|
548 |
|
<condition property="novariance.arg" value="-novariance"> |
549 |
|
<and> |
584 |
|
--> |
585 |
|
|
586 |
|
<path id="pre.bootclasspath"> |
542 |
– |
<!-- <pathelement location="${src.dir}"/> --> |
587 |
|
<pathelement location="${javac.jar}"/> |
588 |
|
</path> |
589 |
|
|
590 |
|
<path id="compile.bootclasspath"> |
591 |
< |
<!-- <pathelement location="${src.dir}"/> --> |
591 |
> |
<pathelement location="${build.classes.dir}"/> |
592 |
|
<pathelement location="${collect.jar}"/> |
593 |
|
<pathelement location="${rt.jar}"/> |
594 |
|
</path> |
704 |
|
</target> |
705 |
|
|
706 |
|
|
707 |
+ |
<target name="ng" depends="test"> |
708 |
+ |
<java classname="SuperfluousAbstract" fork="true"> |
709 |
+ |
|
710 |
+ |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
711 |
+ |
|
712 |
+ |
</java> |
713 |
+ |
</target> |
714 |
+ |
|
715 |
+ |
|
716 |
|
</project> |