How to disable Javadoc test report generation in Maven 3 site plugin?

This is my pom.xml , I am trying to disable the 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> 

However, Maven3 generates Javadoc and Test Javadoc reports on the site. How to fix it?

+4
source share
1 answer

This works correctly for me, as described in Selective Javadocs Reports . Can you double-check the versions of the plugins that you use? Using the snippet below and running mvn site using Maven 3.0.1, only Javadoc generated. Adding the line <report>test-javadoc</report> below the existing <report> leads to the generation of both Javadoc and 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> 
+1
source

Source: https://habr.com/ru/post/1333545/


All Articles