I was wondering if it's possible to configure maven to skip unit tests by default.
In the settings.xml file, inside the properties
tag, add this property: maven.test.skip to true.
<profiles>
<profile>
<id>development</id>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>development</activeProfile>
</activeProfiles>
If the, you want to execute this tests, you can override the property:
mvn clean install -Dmaven.test.skip=false
You can do this by adding a profile
element to the settings.xml
file:
<profile>
<id>skip.tests.by.default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
</profile>
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