Killing Javadoc warnings for specific tags

半腔热情 提交于 2019-12-04 01:30:37
maba

The only answer I could find to this is by Configuring Custom Javadoc Tags.

An example could be like this:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.8.1</version>
            <configuration>
                <tags>
                    <tag>
                        <name>uml.property</name>
                        <!-- The value X makes javadoc ignoring the tag -->
                        <placement>X</placement>
                    </tag>
                    <tag>
                        <name>some.other.property</name>
                        <placement>X</placement>
                    </tag>
                    <tag>
                        <name>some.third.property</name>
                        <placement>X</placement>
                    </tag>
                </tags>
            </configuration>
        </plugin>
    </plugins>
</build>

When running you will see this in the output:

mvn javadoc:javadoc

<lots of output>
Note: Custom tags that were not seen:  @uml.property
<maybe more output>

And you can disable non-error and non-warning messages by using this command:

mvn javadoc:javadoc -Dquiet

It might be a hard job to define all these tags but once done you will no longer see the warnings.

And you should probably define these custom tags in a parent pom that everyone can use to benefit all the work.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!