Simply add the property -Dmaven.test.skip=true to your Maven command. Here is an example:
mvn -Dmaven.test.skip=true install
The compiler will not compile the test sources and will not run your JUnit tests:
[INFO] [compiler:testCompile]
[INFO] Not compiling test sources[INFO] [surefire:test]
[INFO] Tests are skipped.
But of course, your test classes should always run, right?
Reference:
http://maven.apache.org/general.html
Thanks! Nice tip!
ReplyDelete