I have a situation where our unit tests take a long time to execute for our business domain project as it sets up a database to a known state then proceeds to execute each step. I understand this can be done with "-Dmaven.test.skip=true" on the command line but wish to configure this within NetBeans for the project only, globally would be acceptable if anyone could clarify how to configure within the IDE.
How can I configure maven2 to only execute tests when the "test" target is called?
Using the following will disable tests even when the "test" target is called (from the maven docos).
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.6</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
http://maven.apache.org/general.html#skip-test
Just specify -Dmaven.test.skip=true when you invoke a target and don't want to execute tests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With