Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-2124

Avoid creating unnecessary target files for pom projects

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.22.2
    • 3.3.1
    • Maven Failsafe Plugin
    • None

    Description

      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:

      <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>
      

      Maven output:

      [INFO] --- maven-failsafe-plugin:2.22.2:integration-test (failsafe-integration-test) @ parent-project ---
      [INFO] No tests to run.
      

      Content of generated target/failsafe-reports/failsafe-summary.xml :

      <?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>
      

      Attachments

        Activity

          People

            michael-o Michael Osipov
            alexisj Alexis Jehan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: