Build Maven Project Without Running Unit Tests

maven-2unit testing

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?

Best Answer

If you want to skip running and compiling tests:

mvn -Dmaven.test.skip=true install

If you want to compile but not run tests:

mvn install -DskipTests