Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to make maven release plugin skip tests?

I'm running mvn release:prepare -Darguments="-Dmaven.test.skip=true -DskipTests" on the master checkout of Spotify's docker-client. But I can't get maven's release plugin to skip the tests. Why doesn't maven in this case respect the CLI flags?

I'm also curious what causes the release plugin to execute the surefire-plugin. There's no surefire-plugin specified in pom.xml.

mvn --version  Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T12:29:23-05:00) Maven home: /usr/local/Cellar/maven/3.2.5/libexec Java version: 1.7.0_25, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.10.2", arch: "x86_64", family: "mac" 
like image 504
David Xia Avatar asked Mar 09 '15 17:03

David Xia


People also ask

How do I skip the Maven test?

To skip running the tests for a particular project, set the skipTests property to true. You can also skip the tests via the command line by executing the following command: mvn install -DskipTests.

How do you skip an integration test?

If, instead, you want to skip only the integration tests being run by the Failsafe Plugin, you would use the skipITs property instead: mvn install -DskipITs.

How does Maven release plugin work?

The main aim of the maven-release plugin is to provide a standard mechanism to release project artifacts outside the immediate development team. The plugin provides basic functionality to create a release and to update the project's SCM accordingly.


1 Answers

This worked for me. I wanted to both prepare and perform the release.

mvn clean -DskipTests -Darguments=-DskipTests release:prepare release:perform 
like image 137
David Xia Avatar answered Sep 22 '22 07:09

David Xia