| 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"/> |
| 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 |
</target> |
</target> |
| 361 |
</fileset> |
</fileset> |
| 362 |
</copy> |
</copy> |
| 363 |
|
|
|
<!-- Not needed now, used for doccheck filtering: |
|
|
<property name="generic.declarations" |
|
|
value="public interface E {} public interface T {} public interface K {} public interface V {}" |
|
|
/> |
|
|
--> |
|
|
|
|
| 364 |
<copy todir="${build.filter.src.dir}"> |
<copy todir="${build.filter.src.dir}"> |
| 365 |
<fileset dir="${src.dir}"> |
<fileset dir="${src.dir}"> |
| 366 |
<exclude name="**/*.html"/> |
<exclude name="**/*.html"/> |
| 400 |
<param name="pattern" value="^//@"/> |
<param name="pattern" value="^//@"/> |
| 401 |
<param name="replacement" value=""/> |
<param name="replacement" value=""/> |
| 402 |
</filterreader> |
</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 |
# These two filters try to make the source look like |
| 433 |
# something that doccheck can process. The first removes |
# something that doccheck can process. The first removes |
| 434 |
# -source 1.4 assertions and the second adds in a bunch |
# -source 1.4 assertions and the second adds in a bunch |
| 435 |
# of single letter public nested marker interfaces so that |
# of single letter public nested marker interfaces so that |
| 436 |
# the generic type parameters are recognized. |
# the generic type parameters are recognized. |
|
# |
|
|
# Currently commented out because doccheck doesn't work. :-( |
|
| 437 |
--> |
--> |
| 438 |
|
|
|
<!-- |
|
| 439 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 440 |
classpath="${build.ant.dir}"> |
classpath="${build.ant.dir}"> |
| 441 |
<param name="matching" value="^\s*assert[\s ].*$"/> |
<param name="matching" value="^\s*assert[\s ].*$"/> |
| 445 |
|
|
| 446 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 447 |
classpath="${build.ant.dir}"> |
classpath="${build.ant.dir}"> |
| 448 |
<param name="matching" value="^(.*(class|interface|implements) .*|)\{.*$"/> |
<param name="matching" value="^([^*]*(class|interface|implements) .*|)\{.*$"/> |
| 449 |
<param name="pattern" value="$"/> |
<param name="pattern" value="$"/> |
| 450 |
<param name="replacement" value=" ${generic.declarations}"/> |
<param name="replacement" value=" ${generic.declarations}"/> |
| 451 |
</filterreader> |
</filterreader> |
|
--> |
|
| 452 |
|
|
| 453 |
</filterchain> |
</filterchain> |
| 454 |
</copy> |
</copy> |