You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stuart Sierra <th...@gmail.com> on 2011/09/16 16:37:54 UTC

Maven release from Git branch

Hello list!

I use Git, maven-release-plugin, Hudson, and the Hudson M2 Release
Plugin. Can I perform a release from a Git branch other than "master"?

Right now, to do a release, Hudson checks out the "master" branch and
calls "mvn release:prepare release:perform". If the release succeeds,
the M2 Extra Steps Plugin runs "git push origin master `git tag | grep
-v ^hudson`" to update Git tags.

If I change my Hudson config to build a different branch, like
"1.2.x", will the maven-release-plugin still do the right thing?

Thanks,
-Stuart Sierra
clojure.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven release from Git branch

Posted by Stuart Sierra <th...@gmail.com>.
On 17/09/2011, at 12:37 AM, Stuart Sierra wrote:
> I use Git, maven-release-plugin, Hudson, and the Hudson M2 Release
> Plugin. Can I perform a release from a Git branch other than "master"?

On Mon, Sep 19, 2011 at 4:17 AM, Brett Porter <br...@apache.org> wrote:
> I believe so. You may need to set the <tag> element in the <scm> section of the POM on the branch. In my experience, the release plugin correctly releases in that situation (I'm not using Hudson for that, however).

Thanks for the advice, Brett.

As it turned out, I didn't need to change anything in Maven. I just
changed the Hudson configuration to checkout a different branch. I use
Hudson post-build actions to push release tags instead of the Maven
Release plugin, so that I can prevent it from pushing tags if the
build fails.

-Stuart Sierra
clojure.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven release from Git branch

Posted by Brett Porter <br...@apache.org>.
On 17/09/2011, at 12:37 AM, Stuart Sierra wrote:

> Hello list!
> 
> I use Git, maven-release-plugin, Hudson, and the Hudson M2 Release
> Plugin. Can I perform a release from a Git branch other than "master"?
> 
> Right now, to do a release, Hudson checks out the "master" branch and
> calls "mvn release:prepare release:perform". If the release succeeds,
> the M2 Extra Steps Plugin runs "git push origin master `git tag | grep
> -v ^hudson`" to update Git tags.
> 
> If I change my Hudson config to build a different branch, like
> "1.2.x", will the maven-release-plugin still do the right thing?

I believe so. You may need to set the <tag> element in the <scm> section of the POM on the branch. In my experience, the release plugin correctly releases in that situation (I'm not using Hudson for that, however).

- Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org