maven-surefire-report-plugin cannot generate HTML reports ,when commands like
mvn clean package site
mvn site
mvn clean deploy site
aren't able to generate successfull build and it does generate HTML reports on successfull build.
When mvn site command is used it gives following error
[WARNING] Error injecting: org.apache.maven.report.projectinfo.CiManagementRepor t
java.lang.NoClassDefFoundError: org/apache/maven/doxia/siterenderer/DocumentCont ent
The only time HTML reports are generated whether the build is failed or not is when i run
mvn surefire-report:report
This is my master POM.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
</build>
</plugins>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<showSuccess>true</showSuccess>
<outputName>Reports</outputName>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.5</version>
</plugin>
</plugins>
</reporting>
even the site folder is not generated
--fail-at-end
? and-Dmaven.test.failure.ignore=true
? – khmarbaisemvn clean deploy --fail-at-end -Dmaven.test.failure.ignore=true
... – khmarbaise