jira-importer opened a new issue, #2795:
URL: https://github.com/apache/maven-surefire/issues/2795

   **[Martin 
Höller](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=matinh)** 
opened 
**[SUREFIRE-2085](https://issues.apache.org/jira/browse/SUREFIRE-2085?redirect=false)**
 and commented
   
   Assume a simple multi-module project with an API and an implementation 
module with JUnit as the testing framework. The API module just has interfaces 
and no unit tests at all, thus, no dependency to junit. It does not declare any 
configuration of the surefire-plugin in its POM. The implementation module uses 
junit 4.13.2 and has a few tests.
   
   If I run `mvn test -DexcludedGroups=SlowTest` Surefire fails the build of 
the API module with the following error message:
   
   > [ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6:test (default-test) on 
project sample-api: groups/excludedGroups require TestNG, JUnit48+ or JUnit 5 
(a specific engine required on classpath) on project test classpath -> [Help 1]
   
   Note, that tests in the implementation module might (or might not) use 
categories as explained [in the 
documentation](https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html#Using_JUnit_Categories).
   
   IMHO Surefire should not fail the build in this situation as it would 
otherwise require one to either declare an unused dependency or configure 
surefire to be skipped, even if it's not used at all.
   
   See also https://www.mail-archive.com/[email protected]/msg143919.html.
   
   
   ---
   
   **Affects:** 3.0.0-M6
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to