Maven how to skip test to save build time
I was build Clojure 1.6 from the source and don't need to run the tests.
By default, Maven always build and run the tests for you, which sometimes may not what you reall wanted. For example you are building an open source project which could have been built by many people, you know all the tests are right. It will be waste of time to run the test again. It may take quite a lot of time to built and run the tests for some projects.
The command I needed as following
mvn -Dmaven.test.skip=true package
Tests are skipped
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ clojure --- [INFO] Not copying test resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ clojure --- [INFO] Not compiling test sources [INFO] [INFO] --- maven-surefire-plugin:2.6:test (default-test) @ clojure --- [INFO] Tests are skipped. [INFO]
There was another options
But it still build the tests artifacts, just won't run them.