Ulf Lilleengen created SUREFIRE-1645: ----------------------------------------
Summary: Surefire excludedGroups not overriding groups Key: SUREFIRE-1645 URL: https://issues.apache.org/jira/browse/SUREFIRE-1645 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.22.1 Reporter: Ulf Lilleengen With maven-surefire-plugin 2.22.1 and junit platform 1.4.0, junit 5 tests that have tags both in the included and excluded groups will always include the tests. This behavior is different when adding the dependency on junit-platform-surefire-provider 1.3.2, which will cause the exclusion to take precedence over the inclusion. Assuming a test is tagged with both tag1 and tag2, the following will run the test: {code:java} <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.22.1</version> <configuration> <properties> <groups>tag1</groups> <excludedGroups>tag2</excludedGroups> </properties> </configuration> </plugin> {code} Whereas the following will not run the test {code:java} <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <properties> <groups>tag1</groups> <excludedGroups>tag2</excludedGroups> </properties> </configuration> <dependencies> <dependency> <groupId>org.junit.platform</groupId> <artifactId>junit-platform-surefire-provider</artifactId> <version>1.3.2</version> </dependency> </dependencies> </plugin> {code} I think the appropriate thing to do is to have exclusion take precedence over inclusion. -- This message was sent by Atlassian JIRA (v7.6.3#76005)