maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Turner (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SUREFIRE-1599) %regex pattern handling does not match documentation
Date Tue, 13 Nov 2018 00:31:00 GMT
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)

Mime
View raw message