Build failure on project common-utils: groups/excludedGroups require TestNG or JUnit48+ on project test classpath
On the master branch:
mvn install
...
[INFO] Reactor Summary for common 5.4.0-SNAPSHOT:
[INFO]
[INFO] assembly-plugin-boilerplate ........................ SUCCESS [ 0.442 s]
[INFO] Build Tools ........................................ SUCCESS [ 0.358 s]
[INFO] common ............................................. SUCCESS [ 1.048 s]
[INFO] utils .............................................. FAILURE [ 0.620 s]
[INFO] metrics ............................................ SKIPPED
[INFO] config ............................................. SKIPPED
[INFO] common-logging ..................................... SKIPPED
[INFO] confluent-log4j-extensions ......................... SKIPPED
[INFO] confluent-log4j2-extensions ........................ SKIPPED
[INFO] package ............................................ SKIPPED
[INFO] Common ............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.721 s
[INFO] Finished at: 2019-06-04T15:12:11-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project common-utils: groups/excludedGroups require TestNG or JUnit48+ on project test classpath -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :common-utils
I have successfully built Kafka with ./gradlew installAll. Any troubleshooting tips?
How did you manage to solve this problem? I also faced with it
I am also facing the same issue can someone tell me how to resolve it?
I am also facing similar issue. ``[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project dtp-loft-tests: groups/excludedGroups require TestNG or JUnit48+ on project test classpath -> [Help 1] [ERROR]
@Kaurgurjot @anhtv08 I was able to get around this error by adding junit as a dependency in pom.xml to include it in my project like so
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
however this was in the context of smaller avro registry maven project I'm getting up and running and not related to this common-utils project.
Not sure if this is the valid solution but thought I'd share how I got through it!
If you're using junit 5, the addition of the following dependency should solve the problem.
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>
Just had same problem, one module failed on build. It hasn't any tests in it, but has empty src/test/java folder with some empty packages and empty src/test/resources. I completely removed src/test folder, now build is successful.
If you delete the target folder it works.