DevOps / Maven Surefire Plugin Interview Questions
How do you skip tests entirely when running a Maven build?
Two command-line flags achieve this, but they behave differently.
mvn install -DskipTests mvn install -Dmaven.test.skip=true
-DskipTests still compiles the test sources, only the execution is skipped. -Dmaven.test.skip=true skips both compiling and running tests, which is faster but means broken test code won't be caught.
More Related questions...