You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Zac Thompson <za...@gmail.com> on 2010/11/02 17:44:27 UTC

Re: using release:branch

On Fri, Oct 29, 2010 at 3:18 PM, Jon Paynter <ki...@gmail.com> wrote:
> Im trying to get the release:branch goal to create a new branch in my scm
> with a given version number, but it doesnt appear to be working.  Ive tried
> various combinations of parameters from the release:prepare page, but none
> of them seem to do what I want.

Which version of the release plugin are you using?  Which SCM provider?

> so far I have this:
> mvn release:branch -DbranchName=TestBranch -DreleaseVersion=2.1.1
> -DautoVersionSubmodules=true -DupdateWorkingCopyVersions=false
> -DupdateBranchVersions=true -DupdateVersionsToSnapshot=false

I haven't used that particular approach before, but most of what you
have should work.

However, I don't understand what the point is of a branch with a fixed
version on it?  Namely, the "-DreleaseVersion=2.1.1
-DupdateVersionsToSnapshot=false" combination doesn't seem to make
sense to me.  Does the plugin work as expected with something closer
to a default configuration?

> When everything is done I want the following:
>  - a new branch created named 'test branch'
>  - pom files in the new branch updated to 2.1.1
>  - do not prompt me for every single new version number
>  - current branch should be left unchanged
>
> So far what it seems to do is update my pom files to the new version number,
> commit that, then change everything back to the starting version number,
> commit that, make a new branch, and commit that.  ending up with a new
> branch with no visible changes.

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


Re: using release:branch

Posted by Zac Thompson <za...@gmail.com>.
> Our scm here is git

Which version of the release plugin?  Make sure you are using the latest.

>> > so far I have this:
>> > mvn release:branch -DbranchName=TestBranch -DreleaseVersion=2.1.1
>> > -DautoVersionSubmodules=true -DupdateWorkingCopyVersions=false
>> > -DupdateBranchVersions=true -DupdateVersionsToSnapshot=false
>>
>> I haven't used that particular approach before, but most of what you
>> have should work.
>>
>> However, I don't understand what the point is of a branch with a fixed
>> version on it?  Namely, the "-DreleaseVersion=2.1.1
>> -DupdateVersionsToSnapshot=false" combination doesn't seem to make
>> sense to me.  Does the plugin work as expected with something closer
>> to a default configuration?
>>
> Mabye I dont understand the purpose of the plugin....
>
> my goal is to create a new branch from trunk or 'master' in git) with a new
> version number so development can start work on a new set of changes.
> So if the current branch is v2.0, i want to create a new branch labeled 2.1
> (or 2.1-SNAPSHOT), and hand that to the developers to start work.
>  Meanwhile, the current v 2.0 "trunk" should remain unchanged since thats
> the current production version, and I dont want to mess with it.   After
> development on v2.1 is done, it will be merged back into the trunk branch
> and released to the users.

Sounds like the "-DupdateVersionsToSnapshot=false" part is definitely
incorrect; you want SNAPSHOT versions right?

Try it without this flag; all the others look correct to me but I
don't use the plugin with git.

> I would much rather issue a single maven command to create the branch rather
> than having to run several commands in a row:   create branch, switch
> branches, update pom versions, and checkin changes (4 commands vs 1).
> If the release plugin is not the right tool for this job - what would be?

The release plugin is the right tool, or it should be.  If you can't
get it working for you, I would suggest using your 4 steps above and
submit a JIRA issue against the release plugin (the root cause might
be the git scm provider but I doubt it).

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


Re: using release:branch

Posted by Jon Paynter <ki...@gmail.com>.
On Tue, Nov 2, 2010 at 9:44 AM, Zac Thompson <za...@gmail.com> wrote:

> On Fri, Oct 29, 2010 at 3:18 PM, Jon Paynter <ki...@gmail.com> wrote:
> > Im trying to get the release:branch goal to create a new branch in my scm
> > with a given version number, but it doesnt appear to be working.  Ive
> tried
> > various combinations of parameters from the release:prepare page, but
> none
> > of them seem to do what I want.
>
> Which version of the release plugin are you using?  Which SCM provider?
>
Thanks for the reply.
Our scm here is git


>
> > so far I have this:
> > mvn release:branch -DbranchName=TestBranch -DreleaseVersion=2.1.1
> > -DautoVersionSubmodules=true -DupdateWorkingCopyVersions=false
> > -DupdateBranchVersions=true -DupdateVersionsToSnapshot=false
>
> I haven't used that particular approach before, but most of what you
> have should work.
>
> However, I don't understand what the point is of a branch with a fixed
> version on it?  Namely, the "-DreleaseVersion=2.1.1
> -DupdateVersionsToSnapshot=false" combination doesn't seem to make
> sense to me.  Does the plugin work as expected with something closer
> to a default configuration?
>
Mabye I dont understand the purpose of the plugin....

my goal is to create a new branch from trunk or 'master' in git) with a new
version number so development can start work on a new set of changes.
So if the current branch is v2.0, i want to create a new branch labeled 2.1
(or 2.1-SNAPSHOT), and hand that to the developers to start work.
 Meanwhile, the current v 2.0 "trunk" should remain unchanged since thats
the current production version, and I dont want to mess with it.   After
development on v2.1 is done, it will be merged back into the trunk branch
and released to the users.


I would much rather issue a single maven command to create the branch rather
than having to run several commands in a row:   create branch, switch
branches, update pom versions, and checkin changes (4 commands vs 1).
If the release plugin is not the right tool for this job - what would be?