Build Maven Project Without Running Unit Tests
How do you build a Maven project without running unit tests?
Currently restructuring some code I have for a Servlet and would like to try it out in my web browser (which means running mvn install
to get the .war
to upload to Tomcat). I'm fully aware my UNIT tests are failing and I'm fine with that because I will fix it once I have the code the way I want. Can anyone advise?
mvn -Dmaven.test.skip=true install
Edit - As pointed by @cetnar in comments. The above commend will skip running and compiling tests. If you want to compile but not run tests use
mvn install -DskipTests
If you are using eclipse there is a "Skip Tests" checkbox on the configuration page.
Run configurations → Maven Build → New → Main tab → Skip Tests
mvn clean install -DskipTests = true
链接地址: http://www.djcxy.com/p/55898.html