Increase maximum javadoc warnings when compiling with Ant

I recently upgraded my development environment from Java 7 to Java 8, which now detects a large number of previously unknown javadoc problems.

By default, Ant (called through Eclipse Mars) limits its warnings (and I make mistakes) to 100:

Ant warnings limited to 100

Is there any parameter to get Ant to display all javadoc warnings instead of limiting to 100?

I tried using the parameter -Xmaxwarns 1000with an element compilerarg, but it seems that the current version of Ant in Eclipse Mars (Ant 1.9.4) javadoc task does not support the element compilerarg(only supported in javac task )

<!-- Generate the API documentation. -->
<target name="javadoc" depends="clean" description="Generate the API documentation.">

    <!-- Create the build directory structure used by javadoc. -->
    <mkdir dir="${build.folder}" />
    <mkdir dir="${docs.folder}" />

    <!-- Run javadoc. -->

    <javadoc destdir="${docs.folder}/api" author="true" version="true" use="true" windowtitle="${documentation.title}">

        <compilerarg value="-Xmaxerrs 1000 -Xmaxwarns 1000" />

        <classpath>

        ...

ant: javadoc doesn't support the nested "compilerarg" element.

Java 8 javadoc ( ​​ Java 7 b100):

C:\>javadoc -X
  -Xmaxerrs <number>               Set the maximum number of errors to print
  -Xmaxwarns <number>              Set the maximum number of warnings to print

Provided by standard doclet:
  -Xdocrootparent <url>            Replaces all appearances of @docRoot followed

                                   by /.. in doc comments with <url>
  -Xdoclint                        Enable recommended checks for problems in javadoc comments
  -Xdoclint:(all|none|[-]<group>)
        Enable or disable specific checks for problems in javadoc comments,
        where <group> is one of accessibility, html, missing, reference, or syntax.

These options are non-standard and subject to change without notice.

: , Ant javadoc , compilerarg, .

+4
1

, -Xmaxwarns , javadoc.

-Xmaxwarns javadoc <arg> :

<javadoc ...>
    <arg value="-Xmaxwarns"/>
    <arg value="200"/>
</javadoc>

100:

[javadoc] Generating Javadoc
...
[javadoc] 112 warnings
+4

Source: https://habr.com/ru/post/1607938/


All Articles