Alexis Jehan created SUREFIRE-2124:
--------------------------------------
Summary: Avoid creating unnecessary target files for pom projects
Key: SUREFIRE-2124
URL: https://issues.apache.org/jira/browse/SUREFIRE-2124
Project: Maven Surefire
Issue Type: Improvement
Components: Maven Failsafe Plugin
Affects Versions: 2.22.2
Reporter: Alexis Jehan
Because pom projects do not have tests, It is not necessary to create the
{{target/failsafe-reports/failsafe-summary.xml}} file for these projects.
The behavior should be the same as the surefire plugin which works as expected.
Maven configuration :
{noformat}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<!--suppress UnresolvedMavenProperty -->
<argLine>${argLine}
--enable-preview</argLine>
</configuration>
<executions>
<execution>
<id>failsafe-integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>failsafe-verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
{noformat}
Maven output :
{noformat}
[INFO] --- maven-failsafe-plugin:2.22.2:integration-test
(failsafe-integration-test) @ parent-project ---
[INFO] No tests to run.
{noformat}
Content of generated {{target/failsafe-reports/failsafe-summary.xml}} :
{noformat}
<?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>
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)