如何在Maven 3站点插件中禁用Test Javadoc报告的生成? [英] How to disable generation of Test Javadoc report in Maven 3 site plugin?

查看:129
本文介绍了如何在Maven 3站点插件中禁用Test Javadoc报告的生成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的 pom.xml ,我试图在<$ c $中禁用 Test Javadoc 报告c>网站:

This is my pom.xml, I'm trying to disable Test Javadoc report in site:

[...]
<build>
  [...]
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-site-plugin</artifactId>
    <configuration>
      <reportPlugins>
        [...]
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <configuration>
            <reportSets>
              <reportSet>
                <id>html</id>
                <reports>
                  <report>javadoc</report>
                </reports>
              </reportSet>
            <reportSet>
          </configuration>
        </plugin>
      </reportPlugins>
    </configuration>
  </plugin>
</build>

仍然Maven3生成 Javadoc 在网站上测试Javadoc 报告。如何解决?

Still Maven3 generates both Javadoc and Test Javadoc reports in the site. How to fix it?

推荐答案

这对我来说是正确的,如选择性Javadocs报告。你能否重新检查你正在使用的插件版本?使用下面的代码片段并使用Maven 3.0.1运行 mvn site ,只会生成 Javadoc 。在现有的< report> 标记下方添加< report> test-javadoc< / report> 行会导致两个 Javadoc 测试Javadoc 生成。

This works correctly for me as documented in Selective Javadocs reports. Can you re-check the versions of the plugins that you are using? With the snippet below and running mvn site using Maven 3.0.1, only Javadoc gets generated. Adding the line <report>test-javadoc</report> below the existing <report> tag results in both Javadoc and Test Javadoc getting generated.

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.0-beta-3</version>
            <configuration>
                <reportPlugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.7</version>
                        <reportSets>
                            <reportSet>
                                <id>html</id>
                                <reports>
                                    <report>javadoc</report>
                                </reports>
                            </reportSet>
                        </reportSets>
                    </plugin>
                  </reportPlugins>
              </configuration>
          </plugin>

这篇关于如何在Maven 3站点插件中禁用Test Javadoc报告的生成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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