skip=true (or simply -Dmaven. test. skip ) is specified, the test-jar s aren't built, and any module that relies on them will fail its build. In contrast, when you use -DskipTests , Maven does not run the tests, but it does compile them and build the test-jar, making it available for the subsequent modules.
Why is Maven skipping some tests?
When the Surefire plugin reaches the test goal, it will skip the unit tests if the maven. test. skip properties is set to true . Another way to configure Maven to skip unit tests is to add this configuration to your project's pom.
What is Maven test Skip?
In Maven, you can define a system property -Dmaven. test. skip=true to skip the entire unit test. By default, when building project, Maven will run the entire unit tests automatically. If any unit tests is failed, it will force Maven to abort the building process.