Reputation: 6774
Is it possible to configure run as maven install in eclipse to skip unit tests? If so, how can it be done?
Upvotes: 55
Views: 84081
Reputation: 35
An example of a maven build goal to skip tests is: clean install -DskipTests=true -Dmaven.test.failure.ignore=true.
Upvotes: 0
Reputation: 1116
Upvotes: 110
Reputation: 41
Putting this in my Pom.xml turned off the tests for me - but at maven build, not at maven install.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<excludes>
<exclude>**/*Test.java</exclude>
</excludes>
</configuration>
</plugin>
Upvotes: 0
Reputation: 616
accordig to maven's document you can write this in you pom.xml:
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
Upvotes: 7
Reputation: 91
You can put the property maven.test.skip in a profile in your pom. And then you activate this profile in eclipse in the project properties of maven in eclipse.
Upvotes: 5
Reputation: 10789
It depends on maven test plugin that you use. You can try add parameter -Dmaven.test.skip=true
to your build configuration.
Upvotes: 5
Reputation: 13858
At the Run configurations there is a Maven Build type of Run configuration. At that you could set up the standard Maven skipTests parameter.
Upvotes: 1