Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between "-Dmaven.test.skip.exec" vs "-Dmaven.test.skip=true" and "-DskipTests"?

Tags:

maven

I am not sure what the difference between the maven directives -Dmaven.test.skip.exec and -Dmaven.test.skip=true -DskipTests are. Both seem to suppress the testing cycle.

like image 744
René Nyffenegger Avatar asked Feb 21 '14 11:02

René Nyffenegger


People also ask

What is Dskiptests true?

skipTests=true In some cases, you may require compile test sources and only just need to skip tests. Similarly maven. test. skip, you can define system property skipTests from command line or in pom.

What is Dmaven 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.


1 Answers

"maven.test.skip.exec=true" the tests get compiled, but not executed.

"maven.test.skip=true" doesn't compile or execute the tests.

"-DskipTests" is the same as "maven.test.skip.exec=true"

like image 189
SebastianD Avatar answered Oct 11 '22 23:10

SebastianD