39 |
<property name="build.reports.dir" location="${build.dir}/reports"/> |
<property name="build.reports.dir" location="${build.dir}/reports"/> |
40 |
<property name="build.doccheck.dir" location="${build.dir}/doccheck"/> |
<property name="build.doccheck.dir" location="${build.dir}/doccheck"/> |
41 |
<property name="build.filter.src.dir" location="${build.dir}/filtersrc"/> |
<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 --> |
<!-- Source locations --> |
45 |
<property name="src.dir" location="${basedir}/src/main"/> |
<property name="src.dir" location="${basedir}/src/main"/> |
57 |
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
58 |
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
59 |
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
60 |
|
<property name="sinjdoc.jar" location="${lib.dir}/sinjdoc.jar"/> |
61 |
|
|
62 |
|
|
63 |
<!-- Files excluded from dist-docs and emulation jar --> |
<!-- Files excluded from dist-docs and emulation jar --> |
133 |
|
|
134 |
|
|
135 |
<target name="doccheck" |
<target name="doccheck" |
136 |
depends="filter-src" |
depends="filter-doccheck" |
137 |
description="Reports on javadoc style errors (not working yet)"> |
description="Reports on javadoc style errors"> |
138 |
|
|
139 |
<delete dir="${build.doccheck.dir}"/> |
<delete dir="${build.doccheck.dir}"/> |
140 |
<mkdir dir="${build.doccheck.dir}"/> |
<mkdir dir="${build.doccheck.dir}"/> |
142 |
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
143 |
docletpath="${lib.dir}/doccheck.jar" |
docletpath="${lib.dir}/doccheck.jar" |
144 |
destdir="${build.doccheck.dir}"> |
destdir="${build.doccheck.dir}"> |
145 |
<packageset dir="${build.filter.src.dir}"/> |
<packageset dir="${build.filter.doccheck.dir}"/> |
146 |
</javadoc> |
</javadoc> |
147 |
|
|
148 |
|
<echo>DocCheck output is in ${build.doccheck.dir}</echo> |
149 |
|
|
150 |
</target> |
</target> |
151 |
|
|
152 |
|
|
174 |
</target> |
</target> |
175 |
|
|
176 |
|
|
177 |
|
<target name="sinjdocs" |
178 |
|
depends="configure-tests" |
179 |
|
description="Builds javadocs with custom tags to build folder"> |
180 |
|
|
181 |
|
<delete dir="${build.javadocs.dir}"/> |
182 |
|
<mkdir dir="${build.javadocs.dir}"/> |
183 |
|
|
184 |
|
<java classname="net.cscott.sinjdoc.Main" fork="true"> |
185 |
|
|
186 |
|
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
187 |
|
|
188 |
|
<classpath> |
189 |
|
<pathelement location="${sinjdoc.jar}"/> |
190 |
|
<path refid="test.classpath"/> |
191 |
|
</classpath> |
192 |
|
|
193 |
|
<!-- <arg value="-link"/> <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> --> |
194 |
|
|
195 |
|
<arg value="-d"/> <arg value="${build.javadocs.dir}"/> |
196 |
|
<arg value="-sourcepath"/> <arg value="${src.dir}"/> |
197 |
|
<arg value="-overview"/> <arg value="${src.dir}/intro.html"/> |
198 |
|
<arg value="-source"/> <arg value="1.5"/> |
199 |
|
<arg value="-verbose"/> |
200 |
|
<arg value="java.util"/> |
201 |
|
|
202 |
|
<!-- |
203 |
|
<arg value="-help"/> |
204 |
|
--> |
205 |
|
|
206 |
|
</java> |
207 |
|
|
208 |
|
</target> |
209 |
|
|
210 |
|
|
211 |
<target name="strip" |
<target name="strip" |
212 |
depends="init, configure-compiler" |
depends="init, configure-compiler" |
213 |
description="Strip generics from java source (not working yet)"> |
description="Strip generics from java source (not working yet)"> |
397 |
</fileset> |
</fileset> |
398 |
</copy> |
</copy> |
399 |
|
|
|
<!-- Not needed now, used for doccheck filtering: |
|
|
<property name="generic.declarations" |
|
|
value="public interface E {} public interface T {} public interface K {} public interface V {}" |
|
|
/> |
|
|
--> |
|
|
|
|
400 |
<copy todir="${build.filter.src.dir}"> |
<copy todir="${build.filter.src.dir}"> |
401 |
<fileset dir="${src.dir}"> |
<fileset dir="${src.dir}"> |
402 |
<exclude name="**/*.html"/> |
<exclude name="**/*.html"/> |
436 |
<param name="pattern" value="^//@"/> |
<param name="pattern" value="^//@"/> |
437 |
<param name="replacement" value=""/> |
<param name="replacement" value=""/> |
438 |
</filterreader> |
</filterreader> |
439 |
|
</filterchain> |
440 |
|
</copy> |
441 |
|
|
442 |
|
</target> |
443 |
|
|
444 |
|
|
445 |
|
|
446 |
|
|
447 |
|
<target name="filter-doccheck" |
448 |
|
depends="filter-src"> |
449 |
|
|
450 |
|
<mkdir dir="${build.filter.doccheck.dir}"/> |
451 |
|
|
452 |
|
<copy todir="${build.filter.doccheck.dir}"> |
453 |
|
<fileset dir="${build.filter.src.dir}"> |
454 |
|
<include name="**/*.html"/> |
455 |
|
</fileset> |
456 |
|
</copy> |
457 |
|
|
458 |
|
<property name="generic.declarations" |
459 |
|
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 {}" |
460 |
|
/> |
461 |
|
|
462 |
|
<copy todir="${build.filter.doccheck.dir}"> |
463 |
|
<fileset dir="${build.filter.src.dir}"> |
464 |
|
<exclude name="**/*.html"/> |
465 |
|
</fileset> |
466 |
|
<filterchain> |
467 |
<!-- |
<!-- |
468 |
# The next two filters try to make the source look like |
# These two filters try to make the source look like |
469 |
# something that doccheck can process. The first removes |
# something that doccheck can process. The first removes |
470 |
# -source 1.4 assertions and the second adds in a bunch |
# -source 1.4 assertions and the second adds in a bunch |
471 |
# of single letter public nested marker interfaces so that |
# of single letter public nested marker interfaces so that |
472 |
# the generic type parameters are recognized. |
# the generic type parameters are recognized. |
|
# |
|
|
# Currently commented out because doccheck doesn't work. :-( |
|
473 |
--> |
--> |
474 |
|
|
|
<!-- |
|
475 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
476 |
classpath="${build.ant.dir}"> |
classpath="${build.ant.dir}"> |
477 |
<param name="matching" value="^\s*assert[\s ].*$"/> |
<param name="matching" value="^\s*assert[\s ].*$"/> |
481 |
|
|
482 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
483 |
classpath="${build.ant.dir}"> |
classpath="${build.ant.dir}"> |
484 |
<param name="matching" value="^(.*(class|interface|implements) .*|)\{.*$"/> |
<param name="matching" value="^([^*]*(class|interface|implements) .*|)\{.*$"/> |
485 |
<param name="pattern" value="$"/> |
<param name="pattern" value="$"/> |
486 |
<param name="replacement" value=" ${generic.declarations}"/> |
<param name="replacement" value=" ${generic.declarations}"/> |
487 |
</filterreader> |
</filterreader> |
|
--> |
|
488 |
|
|
489 |
</filterchain> |
</filterchain> |
490 |
</copy> |
</copy> |