[
https://issues.apache.org/jira/browse/SUREFIRE-1166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14964722#comment-14964722
]
Tibor Digana commented on SUREFIRE-1166:
----------------------------------------
[~matthias.gradl]
Can you test with 2.19?
The format of regex must not use escape characters and the extension must be
.class
%regex[*.smoketest.Test.class]
which includes class names finished by "smoketest.Test".
Internally the regex matches with file name unlike class name.
This means we are discovering files like:
com/xyz/smoketest/Test.class for Linux, or
com\xyz\smoketest\Test.class for Win
Therefore we declare dot (.) in our regex examples in documentation because we
do not want the users cope with platform slash. We are dependent on a library
which does this filtering for us and I am sure this will not be possible to
change any way.
> Include/Exclude regex pattern for a path is incorrectly replaced on Windows
> ---------------------------------------------------------------------------
>
> Key: SUREFIRE-1166
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1166
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Failsafe Plugin
> Affects Versions: 2.18.1
> Environment: Windows
> Reporter: Matthias Gradl
>
> On non-unix systems, the file scanner converts slashes ("/") into the
> file-system appropriate separator (eg. "\" on Windows) thus colliding with
> the standard escape character in regex Strings.
> For regex pattern matching a path (segment) to a test package (like:
> "%regex[.*/smoketest/.*Test\.java]" this leads to unusable patterns:
> "%regex[.*\smoketest\.*Test\.java]"
> There needs to be a more sophisticated replacement happening when the include
> string is actually a regex pattern.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)