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 |
+ |
<path refid="test.classpath"/> |
193 |
+ |
</classpath> |
194 |
+ |
|
195 |
+ |
<!-- <arg value="-link"/> <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> --> |
196 |
+ |
|
197 |
+ |
<arg value="-d"/> <arg value="${build.javadocs.dir}"/> |
198 |
+ |
<arg value="-sourcepath"/> <arg value="${src.dir}"/> |
199 |
+ |
<arg value="-overview"/> <arg value="${src.dir}/intro.html"/> |
200 |
+ |
<arg value="-source"/> <arg value="1.5"/> |
201 |
+ |
<arg value="-verbose"/> |
202 |
+ |
<arg value="java.util"/> |
203 |
+ |
|
204 |
+ |
<!-- |
205 |
+ |
<arg value="-help"/> |
206 |
+ |
--> |
207 |
+ |
|
208 |
+ |
</java> |
209 |
+ |
|
210 |
+ |
</target> |
211 |
+ |
|
212 |
+ |
|
213 |
|
<target name="strip" |
214 |
|
depends="init, configure-compiler" |
215 |
|
description="Strip generics from java source (not working yet)"> |
399 |
|
</fileset> |
400 |
|
</copy> |
401 |
|
|
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 |
– |
|
402 |
|
<copy todir="${build.filter.src.dir}"> |
403 |
|
<fileset dir="${src.dir}"> |
404 |
|
<exclude name="**/*.html"/> |
438 |
|
<param name="pattern" value="^//@"/> |
439 |
|
<param name="replacement" value=""/> |
440 |
|
</filterreader> |
441 |
+ |
</filterchain> |
442 |
+ |
</copy> |
443 |
+ |
|
444 |
+ |
</target> |
445 |
+ |
|
446 |
|
|
447 |
|
|
448 |
+ |
|
449 |
+ |
<target name="filter-doccheck" |
450 |
+ |
depends="filter-src"> |
451 |
+ |
|
452 |
+ |
<mkdir dir="${build.filter.doccheck.dir}"/> |
453 |
+ |
|
454 |
+ |
<copy todir="${build.filter.doccheck.dir}"> |
455 |
+ |
<fileset dir="${build.filter.src.dir}"> |
456 |
+ |
<include name="**/*.html"/> |
457 |
+ |
</fileset> |
458 |
+ |
</copy> |
459 |
+ |
|
460 |
+ |
<property name="generic.declarations" |
461 |
+ |
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 {}" |
462 |
+ |
/> |
463 |
+ |
|
464 |
+ |
<copy todir="${build.filter.doccheck.dir}"> |
465 |
+ |
<fileset dir="${build.filter.src.dir}"> |
466 |
+ |
<exclude name="**/*.html"/> |
467 |
+ |
</fileset> |
468 |
+ |
<filterchain> |
469 |
|
<!-- |
470 |
< |
# The next two filters try to make the source look like |
470 |
> |
# These two filters try to make the source look like |
471 |
|
# something that doccheck can process. The first removes |
472 |
|
# -source 1.4 assertions and the second adds in a bunch |
473 |
|
# of single letter public nested marker interfaces so that |
474 |
|
# the generic type parameters are recognized. |
416 |
– |
# |
417 |
– |
# Currently commented out because doccheck doesn't work. :-( |
475 |
|
--> |
476 |
|
|
420 |
– |
<!-- |
477 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
478 |
|
classpath="${build.ant.dir}"> |
479 |
|
<param name="matching" value="^\s*assert[\s ].*$"/> |
483 |
|
|
484 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
485 |
|
classpath="${build.ant.dir}"> |
486 |
< |
<param name="matching" value="^(.*(class|interface|implements) .*|)\{.*$"/> |
486 |
> |
<param name="matching" value="^([^*]*(class|interface|implements) .*|)\{.*$"/> |
487 |
|
<param name="pattern" value="$"/> |
488 |
|
<param name="replacement" value=" ${generic.declarations}"/> |
489 |
|
</filterreader> |
434 |
– |
--> |
490 |
|
|
491 |
|
</filterchain> |
492 |
|
</copy> |