[ https://issues.apache.org/jira/browse/SUREFIRE-1309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15700130#comment-15700130 ]
Tibor Digana commented on SUREFIRE-1309: ---------------------------------------- [~sverhagen] Dependencies in Surefire are very old. The regex including slashes are platform dependent which would be {{%regex[my\/package\/???ExcludedTest]}}. But platform dependent slashes are not good and therefore we are not mentioning them and the documentation specifies rather simple form: {{%regex[pkg.*Slow.*.class]}}. I personally do not like it because it is a mixture of using dots which is known in fully qualified class names (f.q.n.) and mixture with {{.class}} which is not related to f.q.c. but the file name. The solution for now would be to have a fix with new Chapter in [1] and you can do it in a new PR. In the version 3.0 it would be nice to change this format and use normal regex for f.q.c. [1] http://maven.apache.org/components/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html > Clarify %regex > -------------- > > Key: SUREFIRE-1309 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1309 > Project: Maven Surefire > Issue Type: Documentation > Affects Versions: 2.19.1 > Environment: Probably any environment > Reporter: Sander Verhagen > > It would be good to clarify the {{%regex ...}} feature: > 1. While it is said to be regular expression, it really is a {{regular > expression + ".class"}} kind of thing. This does not work (while it is proper > regex): > {noformat}.+\.class{noformat} The following works (while it is not proper > regex): {noformat}.+.class{noformat} > 2. Clarify that one is supposed to match slashes between packages and class > name, not periods. The following [current > documentation|http://maven.apache.org/components/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html] > doesn't clarify that by just using "{{.*}}": > {noformat}!%regex[pkg.*Slow.*.class]{noformat} > 3. Clarify what the expectations are in terms of escaping characters > I just spend literally ten hours figuring out a complex regex, going into > TeamCity (which by itself complicated the troubleshooting for me), and the > documentation could have saved my butt, here. -- This message was sent by Atlassian JIRA (v6.3.4#6332)