Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven release:perform without deploy and calling an external shell script

I am using the maven release plugin. Problem is simple: I don't want to do a deploy on release:perform. I actually want to execute a shell script that will do the deploy for me. So I have two things to accomplish:

  1. Somehow disable the default "deploy" goal from release:perform

  2. Somehow make release:perform call the exec:exec plugin to execute a shell script

Here is my pom:

<plugin>     <artifactId>maven-release-plugin</artifactId>     <version>2.0</version>     <configuration>         <tagBase>svn://saoj-la.dyndns.org/webapp-test/tags</tagBase>         <connectionUrl>scm:svn:svn://saoj-la.dyndns.org/webapp-test/trunk</connectionUrl>     </configuration> </plugin>  <plugin>     <groupId>org.codehaus.mojo</groupId>     <artifactId>exec-maven-plugin</artifactId>     <executions>         <execution>             <goals>                 <goal>exec</goal>             </goals>         </execution>     </executions>     <configuration>         <executable>/bin/sh</executable>         <arguments>             <argument>run.sh</argument>         </arguments>     </configuration> </plugin> 
like image 514
TraderJoeChicago Avatar asked Aug 10 '10 00:08

TraderJoeChicago


People also ask

What does Mvn Release perform do?

release:perform will fork a new Maven instance to build the checked-out project. This new Maven instance will use the same system configuration and Maven profiles used by the one running the release:perform goal.

What is Maven release process?

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.

How do I release a project in Maven?

perform some checks – there should be no uncommitted changes and the project should depend on no SNAPSHOT dependencies. change the version of the project in the pom file to a full release number (remove SNAPSHOT suffix) – in our example – 0.1. run the project test suites. commit and push the changes.

Does Maven plugin allows for release of Maven projects?

This plugin is used to release a project with Maven, saving a lot of repetitive, manual work. Releasing a project is made in two steps: prepare and perform. Note: Maven 3 users are encouraged to use at least Maven-3.0.


1 Answers

A little late, but for reference:

For your step 1, you can disable the maven deploy step by using the "skip" option. Click here for reference.

On the commandline you could call something like:

mvn release:perform -Darguments="-Dmaven.deploy.skip=true" 
like image 180
Marja Avatar answered Oct 19 '22 00:10

Marja