5

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>

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

yegor256
  • 102,010
  • 123
  • 446
  • 597

1 Answers1

2

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>
Raghuram
  • 51,854
  • 11
  • 110
  • 122
  • Hm.. I double checked all versions. It's `Maven:3.0`, `maven-site-plugin:3.0-beta-3` and `maven-javadoc-plugin:2.7` (the same as in your example). I still keep getting two reports... Very strange, I will investigate further. – yegor256 Dec 28 '10 at 15:30
  • FYI - This solution worked for me, with 'maven-site-plugin' version 3.0 and 'maven-javadoc-plugin' version 2.8 – Roy Truelove Nov 23 '11 at 15:48