[ 
https://issues.apache.org/jira/browse/SUREFIRE-2106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Krishnan Mahadevan updated SUREFIRE-2106:
-----------------------------------------
    Description: 
Failsafe plugin fails to honour the configuration specified within the 
{code:xml}
<execution>
{code}
tag.

For e.g., when I specify the configuration such as below
{code:xml}
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-failsafe-plugin</artifactId>
    <version>3.0.0-M7</version>
    <configuration>
        <useSystemClassLoader>false</useSystemClassLoader>
        <useManifestOnlyJar>false</useManifestOnlyJar>
        <additionalClasspathElements>
            
<additionalClasspathElement>src/main/resources</additionalClasspathElement>
            
<additionalClasspathElement>${project.build.outputDirectory}</additionalClasspathElement>
        </additionalClasspathElements>
        <classpathDependencyExcludes>
            
<classpathDependencyExclude>${groupId}:${artifactId}</classpathDependencyExclude>
        </classpathDependencyExcludes>
        <useModulePath>false</useModulePath>
    </configuration>
    <executions>
        <execution>
            <phase>integration-test</phase>
            <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
            </goals>
            <configuration>
                <suiteXmlFiles>
                    <suiteXmlFile>src/test/resources/cricket.xml</suiteXmlFile>
                    <suiteXmlFile>src/test/resources/football.xml</suiteXmlFile>
                </suiteXmlFiles>
            </configuration>
        </execution>
    </executions>
    <dependencies>
</dependencies>
</plugin> 
{code}
and then run 

{code}
./mvnw clean test-compile failsafe:integration-test failsafe:verify
{code}

Failsafe does not execute any of the tests that are included in the suite xml 
files provided.

But when the configuration section is housed outside of the execution tag, then 
it works fine.
 
{code:xml}
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-failsafe-plugin</artifactId>
  <version>3.0.0-M7</version>
  <configuration>
    <suiteXmlFiles>
      <suiteXmlFile>src/test/resources/cricket.xml</suiteXmlFile>
      <suiteXmlFile>src/test/resources/football.xml</suiteXmlFile>
    </suiteXmlFiles>
    <useSystemClassLoader>false</useSystemClassLoader>
    <useManifestOnlyJar>false</useManifestOnlyJar>
    <additionalClasspathElements>
      
<additionalClasspathElement>src/main/resources</additionalClasspathElement>
      
<additionalClasspathElement>${project.build.outputDirectory}</additionalClasspathElement>
    </additionalClasspathElements>
    <classpathDependencyExcludes>
      
<classpathDependencyExclude>${groupId}:${artifactId}</classpathDependencyExclude>
    </classpathDependencyExcludes>
    <useModulePath>false</useModulePath>
  </configuration>
  <executions>
    <execution>
      <phase>integration-test</phase>
      <goals>
        <goal>integration-test</goal>
        <goal>verify</goal>
      </goals>
    </execution>
  </executions>
  <dependencies>
  </dependencies>
</plugin>
{code}
 

Sample project that can be used to reproduce the problem is available in 
[https://github.com/krmahadevan/failsafe_experiments] 

 

  was:
Failsafe plugin fails to honour the configuration specified within the 
{noformat}
<execution>{noformat}
tag.

 

For e.g., when I specify the configuration such as below
{code:java}
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-failsafe-plugin</artifactId>
    <version>3.0.0-M7</version>
    <configuration>
        <useSystemClassLoader>false</useSystemClassLoader>
        <useManifestOnlyJar>false</useManifestOnlyJar>
        <additionalClasspathElements>
            
<additionalClasspathElement>src/main/resources</additionalClasspathElement>
            
<additionalClasspathElement>${project.build.outputDirectory}</additionalClasspathElement>
        </additionalClasspathElements>
        <classpathDependencyExcludes>
            
<classpathDependencyExclude>${groupId}:${artifactId}</classpathDependencyExclude>
        </classpathDependencyExcludes>
        <useModulePath>false</useModulePath>
    </configuration>
    <executions>
        <execution>
            <phase>integration-test</phase>
            <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
            </goals>
            <configuration>
                <suiteXmlFiles>
                    <suiteXmlFile>src/test/resources/cricket.xml</suiteXmlFile>
                    <suiteXmlFile>src/test/resources/football.xml</suiteXmlFile>
                </suiteXmlFiles>
            </configuration>
        </execution>
    </executions>
    <dependencies>
</dependencies>
</plugin> {code}
and then run 
{code:java}
./mvnw clean test-compile failsafe:integration-test failsafe:verify{code}
Failsafe does not execute any of the tests that are included in the suite xml 
files provided.

 

But when the configuration section is housed outside of the execution tag, then 
it works fine.

 

Sample project that can be used to reproduce the problem is available in 
https://github.com/krmahadevan/failsafe_experiments 

 


> [Maven-Failesafe-plugin] - Configurations not honoured when specified within 
> <execution> tag
> --------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-2106
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-2106
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Failsafe Plugin
>    Affects Versions: 3.0.0-M7
>            Reporter: Krishnan Mahadevan
>            Priority: Major
>
> Failsafe plugin fails to honour the configuration specified within the 
> {code:xml}
> <execution>
> {code}
> tag.
> For e.g., when I specify the configuration such as below
> {code:xml}
> <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-failsafe-plugin</artifactId>
>     <version>3.0.0-M7</version>
>     <configuration>
>         <useSystemClassLoader>false</useSystemClassLoader>
>         <useManifestOnlyJar>false</useManifestOnlyJar>
>         <additionalClasspathElements>
>             
> <additionalClasspathElement>src/main/resources</additionalClasspathElement>
>             
> <additionalClasspathElement>${project.build.outputDirectory}</additionalClasspathElement>
>         </additionalClasspathElements>
>         <classpathDependencyExcludes>
>             
> <classpathDependencyExclude>${groupId}:${artifactId}</classpathDependencyExclude>
>         </classpathDependencyExcludes>
>         <useModulePath>false</useModulePath>
>     </configuration>
>     <executions>
>         <execution>
>             <phase>integration-test</phase>
>             <goals>
>                 <goal>integration-test</goal>
>                 <goal>verify</goal>
>             </goals>
>             <configuration>
>                 <suiteXmlFiles>
>                     
> <suiteXmlFile>src/test/resources/cricket.xml</suiteXmlFile>
>                     
> <suiteXmlFile>src/test/resources/football.xml</suiteXmlFile>
>                 </suiteXmlFiles>
>             </configuration>
>         </execution>
>     </executions>
>     <dependencies>
> </dependencies>
> </plugin> 
> {code}
> and then run 
> {code}
> ./mvnw clean test-compile failsafe:integration-test failsafe:verify
> {code}
> Failsafe does not execute any of the tests that are included in the suite xml 
> files provided.
> But when the configuration section is housed outside of the execution tag, 
> then it works fine.
>  
> {code:xml}
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-failsafe-plugin</artifactId>
>   <version>3.0.0-M7</version>
>   <configuration>
>     <suiteXmlFiles>
>       <suiteXmlFile>src/test/resources/cricket.xml</suiteXmlFile>
>       <suiteXmlFile>src/test/resources/football.xml</suiteXmlFile>
>     </suiteXmlFiles>
>     <useSystemClassLoader>false</useSystemClassLoader>
>     <useManifestOnlyJar>false</useManifestOnlyJar>
>     <additionalClasspathElements>
>       
> <additionalClasspathElement>src/main/resources</additionalClasspathElement>
>       
> <additionalClasspathElement>${project.build.outputDirectory}</additionalClasspathElement>
>     </additionalClasspathElements>
>     <classpathDependencyExcludes>
>       
> <classpathDependencyExclude>${groupId}:${artifactId}</classpathDependencyExclude>
>     </classpathDependencyExcludes>
>     <useModulePath>false</useModulePath>
>   </configuration>
>   <executions>
>     <execution>
>       <phase>integration-test</phase>
>       <goals>
>         <goal>integration-test</goal>
>         <goal>verify</goal>
>       </goals>
>     </execution>
>   </executions>
>   <dependencies>
>   </dependencies>
> </plugin>
> {code}
>  
> Sample project that can be used to reproduce the problem is available in 
> [https://github.com/krmahadevan/failsafe_experiments] 
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to