When I am running maven clean install
it always executes all tests in src/test/java
is there a way to skip all the tests, just to run simple build without any tests.
I want my tests to be in src/test/java
but I want to tell maven to do not execute them. I've been looking for something like that on the internet but I did not manage to find the answer.
Is there a way to do this?
We can simply skip or ignore them. This behavior is specified in Jenkins. For a Maven project we simply set a parameter in the JVM options of our Maven configuration. This will disable or skip all of the tests in this project.
Maven version 3.2. 1 added this feature, you can use the -pl switch (shortcut for --projects list) with ! or - (source) to exclude certain submodules. Be careful in bash the character ! is a special character, so you either have to single quote it (like I did) or escape it with the backslash character.
Try with:
mvn clean install -DskipTests
Source here.
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