maven-failsafe-plugin
suddenly stopped generating summary file starting with 3.3.0
to 3.4.0
update. This is causing a failure because of which mvn clean verify
won’t succeed on my java project.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:3.5.0:verify (integration-test-verify) on project ABC: /Users/rohan.zaveri/abc/def/xyz/target/failsafe-reports/failsafe-summary-abc.xml (No such file or directory) -> [Help 1]
My maven-failsafe-plugin
setup for integration test reports and verification in the pom.xml
file of my java project root module:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<systemPropertyVariables>
<log4j2.formatMsgNoLookups>true</log4j2.formatMsgNoLookups>
<log4j2.configurationFile>log4j2.properties</log4j2.configurationFile>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<id>integration-test-abc</id>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<argLine>-XX:+StartAttachListener ${failsafeArgLine}</argLine>
<summaryFile>target/failsafe-reports/failsafe-summary-abc.xml</summaryFile>
</configuration>
</execution>
<execution>
<id>integration-test-verify</id>
<goals>
<goal>verify</goal>
</goals>
<configuration>
<summaryFiles>
<summaryFile>target/failsafe-reports/failsafe-summary-abc.xml</summaryFile>
</summaryFiles>
</configuration>
</execution>
</executions>
</plugin>
When I try to update the version from 3.3.0
to 3.4.0
or 3.5.0
, and execute mvn clean verify
, the verify
execution goal on maven-failsafe-plugin
suddenly fails because it can’t find the summary file target/failsafe-reports/failsafe-summary-abc.xml
. On further investigation, I found that the summary file is not generated by the integration-test
execution goal itself.
The only change is the version update. With 3.3.0
, the summary file is generated and with 3.4.0
or 3.5.0
, the file ceases to be generated.
The first module in my project to fail has no integration tests, but that has always been the case. With 3.3.0
, the integration-test
goal will still generate the summary file with the result 254
like so –
<?xml version="1.0" encoding="UTF-8"?>
<failsafe-summary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/failsafe-summary.xsd" result="254" timeout="false">
<completed>0</completed>
<errors>0</errors>
<failures>0</failures>
<skipped>0</skipped>
<failureMessage xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</failsafe-summary>
indicating that the module not having integration test shouldn’t be the root cause.
Other than that, I tried to see some new parameters introduced by maven-failsafe-plugin:3.4.0
but didn’t find anything that could explain this issue.
I can see the goals executing in the logs:
[INFO] --- failsafe:3.5.0:integration-test (integration-test-abc) @ ABC ---
[INFO] No tests to run.
[INFO]
[INFO] --- failsafe:3.5.0:verify (integration-test-verify) @ ABC ---
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:3.5.0:verify (integration-test-verify) on project ABC: /Users/rohan.zaveri/abc/def/xyz/target/failsafe-reports/failsafe-summary-abc.xml (No such file or directory) -> [Help 1]
I was not able to find a similar issue posted by anyone on any online forums. Can anyone help? I am trying to figure out what has changed from maven-failsafe-plugin:3.3.0
to maven-failsafe-plugin:3.4.0
that is causing this failure.
6