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"/> |
57 |
|
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
58 |
|
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
59 |
|
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
60 |
< |
|
60 |
> |
<property name="sinjdoc.jar" location="${lib.dir}/sinjdoc.jar"/> |
61 |
|
|
62 |
|
|
63 |
|
<!-- Files excluded from dist-docs and emulation jar --> |
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 |
+ |
<exclude name="java/util/concurrent/locks/LockSupport*"/> |
76 |
+ |
<exclude name="java/util/concurrent/locks/ReentrantLock*"/> |
77 |
|
</patternset> |
78 |
|
|
79 |
|
|
135 |
|
|
136 |
|
|
137 |
|
<target name="doccheck" |
138 |
< |
depends="filter-src" |
139 |
< |
description="Reports on javadoc style errors (not working yet)"> |
138 |
> |
depends="filter-doccheck" |
139 |
> |
description="Reports on javadoc style errors"> |
140 |
|
|
141 |
|
<delete dir="${build.doccheck.dir}"/> |
142 |
|
<mkdir dir="${build.doccheck.dir}"/> |
144 |
|
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
145 |
|
docletpath="${lib.dir}/doccheck.jar" |
146 |
|
destdir="${build.doccheck.dir}"> |
147 |
< |
<packageset dir="${build.filter.src.dir}"/> |
147 |
> |
<packageset dir="${build.filter.doccheck.dir}"/> |
148 |
|
</javadoc> |
149 |
|
|
150 |
+ |
<echo>DocCheck output is in ${build.doccheck.dir}</echo> |
151 |
+ |
|
152 |
|
</target> |
153 |
|
|
154 |
|
|
176 |
|
</target> |
177 |
|
|
178 |
|
|
179 |
+ |
<target name="sinjdocs" |
180 |
+ |
depends="configure-tests" |
181 |
+ |
description="Builds javadocs with custom tags to build folder"> |
182 |
+ |
|
183 |
+ |
<delete dir="${build.javadocs.dir}"/> |
184 |
+ |
<mkdir dir="${build.javadocs.dir}"/> |
185 |
+ |
|
186 |
+ |
<java classname="net.cscott.sinjdoc.Main" fork="true"> |
187 |
+ |
|
188 |
+ |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
189 |
+ |
|
190 |
+ |
<classpath> |
191 |
+ |
<pathelement location="${sinjdoc.jar}"/> |
192 |
+ |
<pathelement location="${lib.dir}/jutil.jar"/> |
193 |
+ |
<pathelement location="${lib.dir}/cup.jar"/> |
194 |
+ |
<path refid="test.classpath"/> |
195 |
+ |
</classpath> |
196 |
+ |
|
197 |
+ |
|
198 |
+ |
<arg value="-d"/> <arg value="${build.javadocs.dir}"/> |
199 |
+ |
<arg value="-sourcepath"/> <arg value="${src.dir}"/> |
200 |
+ |
<arg value="-overview"/> <arg value="${src.dir}/intro.html"/> |
201 |
+ |
<arg value="-source"/> <arg value="${build.sourcelevel}"/> |
202 |
+ |
<!-- <arg value="-verbose"/> --> |
203 |
+ |
<!-- <arg value="-link"/> <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> --> |
204 |
+ |
<arg value="java.lang"/> |
205 |
+ |
<arg value="java.util"/> |
206 |
+ |
<arg value="java.util.concurrent"/> |
207 |
+ |
<arg value="java.util.concurrent.atomic"/> |
208 |
+ |
<arg value="java.util.concurrent.locks"/> |
209 |
+ |
|
210 |
+ |
<!-- |
211 |
+ |
<arg value="-help"/> |
212 |
+ |
--> |
213 |
+ |
|
214 |
+ |
</java> |
215 |
+ |
|
216 |
+ |
</target> |
217 |
+ |
|
218 |
+ |
|
219 |
|
<target name="strip" |
220 |
|
depends="init, configure-compiler" |
221 |
|
description="Strip generics from java source (not working yet)"> |
405 |
|
</fileset> |
406 |
|
</copy> |
407 |
|
|
363 |
– |
<!-- Not needed now, used for doccheck filtering: |
364 |
– |
<property name="generic.declarations" |
365 |
– |
value="public interface E {} public interface T {} public interface K {} public interface V {}" |
366 |
– |
/> |
367 |
– |
--> |
368 |
– |
|
408 |
|
<copy todir="${build.filter.src.dir}"> |
409 |
|
<fileset dir="${src.dir}"> |
410 |
|
<exclude name="**/*.html"/> |
444 |
|
<param name="pattern" value="^//@"/> |
445 |
|
<param name="replacement" value=""/> |
446 |
|
</filterreader> |
447 |
+ |
</filterchain> |
448 |
+ |
</copy> |
449 |
+ |
|
450 |
+ |
</target> |
451 |
+ |
|
452 |
+ |
|
453 |
|
|
454 |
|
|
455 |
+ |
<target name="filter-doccheck" |
456 |
+ |
depends="filter-src"> |
457 |
+ |
|
458 |
+ |
<mkdir dir="${build.filter.doccheck.dir}"/> |
459 |
+ |
|
460 |
+ |
<copy todir="${build.filter.doccheck.dir}"> |
461 |
+ |
<fileset dir="${build.filter.src.dir}"> |
462 |
+ |
<include name="**/*.html"/> |
463 |
+ |
</fileset> |
464 |
+ |
</copy> |
465 |
+ |
|
466 |
+ |
<property name="generic.declarations" |
467 |
+ |
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 {}" |
468 |
+ |
/> |
469 |
+ |
|
470 |
+ |
<copy todir="${build.filter.doccheck.dir}"> |
471 |
+ |
<fileset dir="${build.filter.src.dir}"> |
472 |
+ |
<exclude name="**/*.html"/> |
473 |
+ |
</fileset> |
474 |
+ |
<filterchain> |
475 |
|
<!-- |
476 |
< |
# The next two filters try to make the source look like |
476 |
> |
# These two filters try to make the source look like |
477 |
|
# something that doccheck can process. The first removes |
478 |
|
# -source 1.4 assertions and the second adds in a bunch |
479 |
|
# of single letter public nested marker interfaces so that |
480 |
|
# the generic type parameters are recognized. |
416 |
– |
# |
417 |
– |
# Currently commented out because doccheck doesn't work. :-( |
481 |
|
--> |
482 |
|
|
420 |
– |
<!-- |
483 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
484 |
|
classpath="${build.ant.dir}"> |
485 |
|
<param name="matching" value="^\s*assert[\s ].*$"/> |
489 |
|
|
490 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
491 |
|
classpath="${build.ant.dir}"> |
492 |
< |
<param name="matching" value="^(.*(class|interface|implements) .*|)\{.*$"/> |
492 |
> |
<param name="matching" value="^([^*]*(class|interface|implements) .*|)\{.*$"/> |
493 |
|
<param name="pattern" value="$"/> |
494 |
|
<param name="replacement" value=" ${generic.declarations}"/> |
495 |
|
</filterreader> |
434 |
– |
--> |
496 |
|
|
497 |
|
</filterchain> |
498 |
|
</copy> |