Bryan Turner created SUREFIRE-1599: -------------------------------------- Summary: %regex pattern handling does not match documentation Key: SUREFIRE-1599 URL: https://issues.apache.org/jira/browse/SUREFIRE-1599 Project: Maven Surefire Issue Type: Bug Components: documentation Affects Versions: 2.22.1, 2.22.0 Environment: Windows Reporter: Bryan Turner
[This pull request|https://github.com/apache/maven-surefire/pull/138] updated the inclusion/exclusion documentation to state: {quote} Regex matches are done over paths using slashes ("/") and not package names using dots ("."), so the "." in pkg.\*Slow.\*.class is a regex metacharacter, which happens to match any character, notably the (forward) slashes ("/") that make up the path. Slashes here are forward, even on Windows {quote} That's not true, at least in Surefire 2.22+. I've prepared a [simple reproduction|https://github.com/bturner/surefire-slashes]. Built on Linux or macOS, Surefire will correctly skip {{ExampleIntegrationTest}}, but on Windows it will run (and fail the build). Surefire is configured as follows: {code} <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.22.1</version> <configuration> <excludes> <exclude>%regex[it/.*]</exclude> </excludes> </configuration> </plugin> {code} Per the documentation, that forward slash should work on Windows as well as Linux and macOS. (Note: This also effects Failsafe, as one might expect.) -- This message was sent by Atlassian JIRA (v7.6.3#76005)