Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.14.1, 2.15
-
None
-
Patch
Description
- We have a lot of projects in our CI system (Jenkins) where we run mvn clean deploy site-deploy.
- Because of this, we do not repeat test execution again during phase site by defining the reportSet to include report-only.
- However, report-only does invoke the phase validate again which will execute some lengthy enforcer checks.
- I created a clone of maven-surefire where I did redefine report-only to not fork the lifecyle and have a small integration-test project https://github.com/mfriedenhagen/pastebin/tree/surefire-reportonly-test which will show the issue:
- Running mvn -e will produce the following output:
[INFO] --- maven-site-plugin:3.0:site (default-site) @ surefire-reportonly-test --- [INFO] configuring report plugin org.apache.maven.plugins:maven-jxr-plugin:2.3 [INFO] configuring report plugin org.apache.maven.plugins:maven-surefire-report-plugin:2.14.1 [INFO] [INFO] >>> maven-surefire-report-plugin:2.14.1:report-only (report:report-only) @ surefire-reportonly-test >>> [INFO] [INFO] <<< maven-surefire-report-plugin:2.14.1:report-only (report:report-only) @ surefire-reportonly-test <<< [INFO] [INFO] >>> maven-surefire-report-plugin:2.14.1:failsafe-report-only (report:failsafe-report-only) @ surefire-reportonly-test >>> [INFO] [INFO] <<< maven-surefire-report-plugin:2.14.1:failsafe-report-only (report:failsafe-report-only) @ surefire-reportonly-test <<< [INFO] Relativizing decoration links with respect to project URL: https://github.com/mfriedenhagen/pastebin
- When running mvn -e -Dmaven-surefire-plugin.version=2.15-SNAPSHOT the following output will be produced:
[INFO] --- maven-site-plugin:3.0:site (default-site) @ surefire-reportonly-test --- [INFO] configuring report plugin org.apache.maven.plugins:maven-jxr-plugin:2.3 [INFO] configuring report plugin org.apache.maven.plugins:maven-surefire-report-plugin:2.15-SNAPSHOT [INFO] Relativizing decoration links with respect to project URL: https://github.com/mfriedenhagen/pastebin [INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin. [INFO] Skipped "Test Source Xref" report, file "xref-test/index.html" already exists for the English version. [INFO] Generating "Test Source Xref" report --- maven-jxr-plugin:2.3 [INFO] Generating "Surefire Report" report --- maven-surefire-report-plugin:2.15-SNAPSHOT [INFO] Generating "Failsafe Report" report --- maven-surefire-report-plugin:2.15-SNAPSHOT [INFO] ------------------------------------------------------------------------
I will include the pull request in a comment.