杀死特定标签的Javadoc警告 [英] Killing Javadoc warnings for specific tags

查看:84
本文介绍了杀死特定标签的Javadoc警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用Maven进行构建时,是否存在防止Javadoc警告的简便方法/选项?我们将soyatec uml插件用于eclipse,并插入特殊的标签,这些标签使我们的构建引发很多烦人的警告.我环顾四周,包括在soyatec网站上,都空了出来.

Is there an easy way / option of preventing javadoc warnings when building with Maven? We use the soyatec uml plugin for eclipse and it inserts special tags which make our builds throw lots of annoying warnings; I've looked around including on the soyatec site and have come up empty.


@uml.property is an unknown tag

推荐答案

我能找到的唯一答案是

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.

您可能应该在父pom中定义这些自定义标签,每个人都可以用来使所有工作受益.

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

这篇关于杀死特定标签的Javadoc警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆