[ https://jira.codehaus.org/browse/SUREFIRE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314720#comment-314720 ]
Markus Bartels commented on SUREFIRE-839: ----------------------------------------- Same here. Configuration: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <excludedGroups> com.test.MyGroup, com.test.MyGroup2 </excludedGroups> <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests> <failIfNoTests>false</failIfNoTests> </configuration> </plugin> Leads to: Concurrency config is parallel='none', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false Running org.junit.runner.manipulation.Filter Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec <<< FAILURE! initializationError(org.junit.runner.manipulation.Filter) Time elapsed: 0 sec <<< ERROR! java.lang.Exception: No tests found matching NOT *com.test.MyGroup OR *com.test.MyGroup2 from org.junit.runner.Request$1@1e3c2c6 at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:37) at org.junit.runner.JUnitCore.run(JUnitCore.java:136) at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:62) at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:139) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) Results : Tests in error: initializationError(org.junit.runner.manipulation.Filter): No tests found matching NOT *com.test.MyGroup OR *com.test.MyGroup2 from org.junit.runner.Request$1@1e3c2c6 > If no tests are found that would match a given JUnit category, mvn test > should not fail in multi-module project > --------------------------------------------------------------------------------------------------------------- > > Key: SUREFIRE-839 > URL: https://jira.codehaus.org/browse/SUREFIRE-839 > Project: Maven Surefire > Issue Type: Improvement > Components: Junit 4.7+ (parallel) support > Affects Versions: 2.12 > Reporter: Martin Burger > > In a multi-module project, I configured Surefire to execute tests of a > selected JUnit category only. Unfortunately, not all modules contain tests in > that category, which makes mvn test fail: > Tests in error: > initializationError(org.junit.runner.manipulation.Filter): No tests found > matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a > If a module does not contain any test that would match the given category, > Surefire should continue instead. Note that specifying -DfailIfNoTests=false > does not help in that case. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira