5

这是我的pom.xml,我正在尝试禁用Test Javadoc报告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 在站点中生成JavadocTest Javadoc报告。如何解决?

4

1 回答 1

2

这对我来说是正确的,如Selective Javadocs 报告中所述。您可以重新检查您正在使用的插件的版本吗?使用下面的代码片段并mvn site使用 Maven 3.0.1 运行,只会Javadoc生成。<report>test-javadoc</report>在现有标签下方添加一行<report>会导致两者都Javadoc生成Test Javadoc

        <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>
于 2010-12-28T13:15:51.807 回答