[ https://jira.codehaus.org/browse/SUREFIRE-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=356228#comment-356228 ]
Tibor Digana commented on SUREFIRE-1054: ---------------------------------------- @Molloware It's not about simplicity however I understand that you want more comfort. In such cases I use Maven profiles, and every of them has own surefire/failsafe configuration. Thus I am using -P profile instead of overriding plugin parameter with system properties. The main idea of sections "includes/excludes" to be complementary to "test". The people use -Dtest= when tuning their build or in their scripts, we have to ignore "includes/excludes" to select *.class files in classpath. Overriding excludedGroups would break current users. I guess since of "test" parameter may have regex, the "excludedGroups" parameter may impose new selectivity which is expected in includes/excludes or test param as well. The "test" parameter is very usually configured via system property in command line which takes precedence over POM configuration. Please try to use -DexcludedGroups= system property as long as you can, however in surefire 3.0 you will have options to configure surefire/failsafe in the code. We were discussing your issue in Maven mailing list as well http://maven.40175.n5.nabble.com/SUREFIRE-List-of-simple-issues-to-fix-td5814089.html > "test" property overrides "excludes" but not "excludedGroups" > ------------------------------------------------------------- > > Key: SUREFIRE-1054 > URL: https://jira.codehaus.org/browse/SUREFIRE-1054 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin > Affects Versions: 2.16 > Environment: Maven 3.1.1, JUnit 4.11, maven-surefire-plugin 2.16 > Reporter: Elizabeth Chatman > Assignee: Tibor Digana > > I recently changed my maven configuration to use the "excludedGroups" > property instead of "excludes", and found that I can no longer run individual > tests if they are part of the excludedGroups. > Example: > My default configuration used to look like this (using path and filename > matching to try to match groups of tests): > {code:xml} > <excludes> > <exclude>**/integration/**</exclude> > <exclude>**/*IntegrationTest.java</exclude> > </excludes> > {code} > My new configuration, after annotating my integration tests with > {{@Category(IntegrationTests.class)}}: > {code:xml}<excludedGroups>com.mycompany.IntegrationTests</excludedGroups>{code} > Previously, I could run a single integration test using: > {{mvn test -Dtest=NameOfIntegrationTest}} > Now that command fails ("No tests were executed!") unless I manually override > the excludedGroups property ({{mvn test -Dtest=NameOfIntegrationTest > -DexcludedGroups=}}) -- This message was sent by Atlassian JIRA (v6.1.6#6162)