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

Paul Gier closed SUREFIRE-766.
------------------------------

    Resolution: Fixed

Fixed in [r1175098|http://svn.apache.org/viewvc?view=revision&revision=1175098].

The reason that "once" worked but not "always" and "never", is because forking 
"once" uses the directory scanner after the list of excludes is split and put 
into a properties file and then read back in as separate elements.  "always" 
and "never" use the list of excludes without splitting the elements with a 
comma, and the plexus utils scanner couldn't deal with elements with a comma in 
them.

> Regression in excludes feature between surefire 2.6 and 2.7.
> ------------------------------------------------------------
>
>                 Key: SUREFIRE-766
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-766
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Junit 4.x support
>    Affects Versions: 2.7, 2.7.1, 2.7.2, 2.8, 2.8.1, 2.9
>            Reporter: Jonathan Hsieh
>            Assignee: Paul Gier
>             Fix For: 2.10
>
>
> I have a build that excludes certain JUnit 4 test cases by allowing users to 
> specify a -Dtest.exclude.pattern=**/TestA*.java,**/TestB*.java style command 
> line argument.  This worked for surefire 2.5, 2.6 but fails to work in 2.7, 
> 2.7.1, 2.7.2, 2.8, 2.8.1, and 2.9 releases.  
> Here's how I pass in the excludes from the command line:
> {code}
> ...
> <plugins> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <configuration>
>           <forkMode>always</forkMode>
>           <includes>
>             <include>**/Test*.java</include>
>           </includes>
>           <excludes>
>             <exclude>**/*$*</exclude>
>             <exclude>${test.exclude.pattern}</exclude>
>           </excludes>
> ...
> {code}
> and 
> {code}
> ...
> <properties>
>    ...
>    <!-- For flaky tests exclusion -->
>     <test.exclude />
>     <test.exclude.pattern>**/${test.exclude}.java</test.exclude.pattern>
>   </properties>
> ...
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to