Thursday, July 15, 2021

Maven : -DskipTests vs -Dmaven.test.skip=true

https://stackoverflow.com/questions/25639336/whats-the-difference-between-dskiptests-and-dmaven-test-skip-true 


Maven docs:

-DskipTests compiles the tests, but skips running them

-Dmaven.test.skip=true skips compiling the tests and does not run them

Also this one might be important

maven.test.skip is honored by Surefire, Failsafe and the Compiler Plugin


So the complete set of test options for Maven would be:

  • -DskipTests ==> compiles the tests, but skips running them
  • -Dmaven.test.skip.exec=true ==> the tests get compiled, but not executed.
  • -Dmaven.test.skip=true ==> doesn't compile or execute the tests.

 

No comments:

Post a Comment

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass