1,657 questions
0 votes
0 answers
37 views
Maven merging two profiles
I have two profiles with plugin maven-failsafe-plugin <profile> <id>cdc-tests</id> <build> <plugins> <plugin> <plugin&...
1 vote
1 answer
110 views
Does adding opens configuration in maven surefire plugin effect anything outside the test scope?
I'm working on a user-related service that handles personal information. While writing unit tests with Mockito, I ran into dependency issues with Byte Buddy, which prevented me from using the latest ...
0 votes
2 answers
121 views
NoClassDefFoundError: org/slf4j/LoggerFactory when running in Intellij but works fine from the command line
I am having issues related to my tests which are failing because of slf4j-api being absent, which does not make sense because it is present as it is provided as a transitive dependency from one of the ...
0 votes
0 answers
74 views
maven-surefire-plugin does not work in tycho, uses junit4 when explicitly executed
This might be two different problems, but I suspect both related to tycho, this is why I ask them together. I have a project using eclipse-test-plugin packaging. As I could not get tycho-surefire-...
0 votes
0 answers
67 views
Maven YAML pipeline not running tests but tests exist
I am trying to test my code in a YAML pipeline using Maven but for whatever reason mvn test seems to skip over the compiled test. Here is part of my pipeline, with specific point to look at the test ...
0 votes
2 answers
56 views
How to run tagged tests that are explicitly excluded in pom.xml?
This is part of my pom.xml: <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>3.5.3</version> <configuration> <excludedGroups>slow<...
0 votes
1 answer
37 views
How to add to modulepath?
Surefire has a parameter called additionalClasspathElements for adding elements to the test classpath. Is there a way to add elements to the test modulepath instead?
0 votes
0 answers
259 views
maven-surefire-plugin with version 3.5.3 shutdown hook is not triggered
Using JDK: openjdk 17.0.14 2025-01-21 Apache Maven 3.8.8 maven surfire plugin org.apache.maven.plugins maven-surefire-plugin 3.5.3 I registered a shutdownhook: Runtime.getRuntime().addShutdownHook(...
1 vote
0 answers
79 views
excludedGroups stopped excluding TestNG tests
For a few years now, we've been using Maven projects to test our API. Tests would be marked with different groups, for example: @Test(groups = {"priority_very_high", "test_ignored"}...
0 votes
0 answers
383 views
how to fix maven-compiler-plugin:3.13.0:compile in Eclipse is not found I update the version but its updating till version 1.0
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:3.3.1 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache....
0 votes
1 answer
77 views
MojoFailureException: No tests were executed! Passes when run in VSCode/Intellij, fails in Maven, other tests pass in Maven
When I run this test from VSCode or Intellij it works fine. When I run it from Maven using the command below it fails. Getting this error: org.apache.maven.plugin.MojoFailureException: No tests were ...
0 votes
1 answer
69 views
Integration Test reports are getting generated under /target/surefire-reoport instead of /target/failsafe-report
The project I am working on currently has unit tests and integration tests both. The unit tests are correctly getting generated under /target/surefire-report/junitreports reports but the Integration ...
0 votes
0 answers
128 views
Junit 5 maven-surefire-plugin not showing ParameterizedTest values in report
I have a Junit 5 test @ParameterizedTest(name = "{index}: {0}") @MethodSource("data") test_CHECKVALUE(String, Boolean, String) If I run this test in VS code the name of the test ...
0 votes
1 answer
560 views
Maven Surefire Plugin Configuration with JUnit5 and TestNG Failing
I currently migrated a project from JUnit4 to JUnit5. The test classes are a mixture of JUnit and TestNG. My current maven plugin is written in the parent POM like: <!-- https://mvnrepository.com/...
0 votes
1 answer
112 views
Inconsistent Mockito errors between individual and full tests execution
I have a project written in Java 11 with thousands of test, some of them using the Mockito library. When running all the tests with mvn test, I get the following: [ERROR] Tests run: 26987, Failures: 0,...