Skipping Unit Tests with Maven Projects in NetBeans

One of the annoying things with Maven is that it runs your unit tests every time a build is done. If you are working on a Java EE application where you are frequently hitting “running” the target to test changes to JSF pages this can get very annoying. With lots of tests this can definitely crimp turn-around time. On the NetBeans Project Properties dialog you can configure NetBeans so that when it invokes Maven for a build/deploy the unit tests are skipped. To do this:

  1. Choose File | Project Properties
  2. Select Actions in the Categories list box.
  3. Add maven.test.skip=true to Run Project, Debug Project, Profile Project

mavenjavaee

%d