[ https://jira.codehaus.org/browse/SUREFIRE-862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=363308#comment-363308 ]
Elad Tabak commented on SUREFIRE-862: ------------------------------------- Thanks @Tibor. I created a test project that presents this issue. But I'm not sure it's the surefire plugin fault. Rather the failsafe plugin. Here's the details: I created a source class, and a test class. Test class contains a single test method that should fail (assertion does not match). The test is annotated with {code}@Test(groups = "group1"){code}. That group is excluded in the surefire configuration, as well is in the failsafe configuration. Now, I'm running: 1) {code}mvn clean install{code} result is that the test is running on "verify" goal. Expected it NOT to run, as it is excluded on all plugins. 2) {code}mvn clean install -DexcludedGroups=group1{code} result is that the test is not running at all, and build succeed. Since the test is running in the verify goal, I think the blame here is the failsafe plugin. I can send you the test project if you like to have a look. > excludedGroups property does not work with JUnit > ------------------------------------------------ > > Key: SUREFIRE-862 > URL: https://jira.codehaus.org/browse/SUREFIRE-862 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin > Affects Versions: 2.12 > Environment: Windows, Maven 3.0.3 > Reporter: Rene Grohmann > Assignee: Kristian Rosenvold > Fix For: 2.12.3 > > > If i use the groups property in my maven configuration everything works how > expected. The plugin only selects the tests with the specific category. On > the other Hand, if i use the excludedGroups property the plugin could not > find any tests to run. > <plugin> > <artifactId>maven-surefire-plugin</artifactId> > <version>2.11</version> > <dependencies> > <dependency> > <groupId>org.apache.maven.surefire</groupId> > <artifactId>surefire-junit47</artifactId> > <version>2.12</version> > </dependency> > </dependencies> > <configuration> > <excludedGroups>de.test.junit.categories.IntegrationTest</excludedGroups> > </configuration> > </plugin> -- This message was sent by Atlassian JIRA (v6.1.6#6162)