You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Leonie <le...@rmb.co.za> on 2014/10/31 16:41:04 UTC

mvn release:branch updating POM incorrectly

Good day,

I hope someone can assist. I have posted something, but did not get any
reply. When running the release:branch, my branch gets created, but my scn
connection url in the trunk POM is not updating to point to the new branch's
URL.

I tried to pinpoint the problem. I opened the POM in notepad ++ and ran the
mvn release:branch command. I could see the POM file updated when the second
cmd.exe ran, but when the third cmd.exe ran, the POM changed scm connection 
url back to what it was before I tried to create the branch. Thanks in
advance. I need a solution before Monday and have no idea what to do
anymore. 
pr <http://maven.40175.n5.nabble.com/file/n5811978/Untitled.bmp> oblem. I
can see that my POM file gets updated, b



--
View this message in context: http://maven.40175.n5.nabble.com/mvn-release-branch-updating-POM-incorrectly-tp5811978.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: mvn release:branch updating POM incorrectly

Posted by Leonie <le...@rmb.co.za>.
Thanks Robert. We currently use Maven 2.0.10. I appreciate your help. I'm
totally new with the tool. 



--
View this message in context: http://maven.40175.n5.nabble.com/mvn-release-branch-updating-POM-incorrectly-tp5811978p5812320.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: mvn release:branch updating POM incorrectly

Posted by Leonie <le...@rmb.co.za>.
Hi Robert, just wanted to share. I came up with a nice algorithm :-) I do a
dryrun before I run release:branch and after the release:branch, i delete
the POM and rename POM.xml.branch to POM.xml and commit.



--
View this message in context: http://maven.40175.n5.nabble.com/mvn-release-branch-updating-POM-incorrectly-tp5811978p5812346.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: mvn release:branch updating POM incorrectly

Posted by Robert Scholte <rf...@apache.org>.
"Some of the jars require maven 2 to build, so I cannot use the newest  
release plugin"

I don't understand this: Maven 2.2.1 is a specific version of Maven2, so  
that should work.
I'm not aware of plugins who can be used with Maven 2.0.10, but not with  
Maven 2.2.1

So start by upgrading Maven and try your builds, it should be a painless  
upgrade.

Next upgrade the maven-release-plugin in your pom.xml

And no: I don't think there are other plugins which can update the  
connection url.
However, if you want to branch with a maven-plugin, you can also use the  
scm:branch[1]

best,
Robert

[1] http://maven.apache.org/scm/maven-scm-plugin/branch-mojo.html



Op Sat, 01 Nov 2014 22:45:20 +0100 schreef Leonie  
<le...@rmb.co.za>:

> Good day Robert,
>
> I wondered if you might be aware of a plugin that I can use to update the
> scm connection? Then I can create the branch with mvn release:branch and
> after that is complete I can update the connection with another command.  
> I'm
> trying to script a release. Some of the jars require maven 2 to build,  
> so I
> cannot use the newest release plugin
>
> Thanks in advance
>
>
>
> --
> View this message in context:  
> http://maven.40175.n5.nabble.com/mvn-release-branch-updating-POM-incorrectly-tp5811978p5812295.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

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


Re: mvn release:branch updating POM incorrectly

Posted by Leonie <le...@rmb.co.za>.
Good day Robert,

I wondered if you might be aware of a plugin that I can use to update the
scm connection? Then I can create the branch with mvn release:branch and
after that is complete I can update the connection with another command. I'm
trying to script a release. Some of the jars require maven 2 to build, so I
cannot use the newest release plugin

Thanks in advance



--
View this message in context: http://maven.40175.n5.nabble.com/mvn-release-branch-updating-POM-incorrectly-tp5811978p5812295.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: mvn release:branch updating POM incorrectly

Posted by Robert Scholte <rf...@apache.org>.
Hi Leonie,

I wasn't actually speaking about the Maven version, although that explains  
why I couldn't see the versions of the plugins, but I was talking about  
the maven-release-plugin version.
Because of that I assume you're using maven-release-plugin 2.0 (if you  
haven't specified it in the pom.xml, this is the default IIRC).
The latest version of the maven-release-plugin is 2.5.1 and it requires  
Maven 2.2.1. Give it a try and let us know if that works for you.

Robert

Op Fri, 31 Oct 2014 18:51:31 +0100 schreef Leonie  
<le...@rmb.co.za>:

> Thank you Robert. I'm not using the latest maven release. Using 2.0.10.  
> Will
> upgrade.
>
>
>
>
> --
> View this message in context:  
> http://maven.40175.n5.nabble.com/mvn-release-branch-updating-POM-incorrectly-tp5811978p5812022.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

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


Re: mvn release:branch updating POM incorrectly

Posted by Leonie <le...@rmb.co.za>.
Thank you Robert. I'm not using the latest maven release. Using 2.0.10. Will
upgrade.




--
View this message in context: http://maven.40175.n5.nabble.com/mvn-release-branch-updating-POM-incorrectly-tp5811978p5812022.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: mvn release:branch updating POM incorrectly

Posted by Robert Scholte <rf...@apache.org>.
Hi,

I can't see which version you are using.
A good start would be to ensure you're using the latest (i.e 2.5.1) by  
locking the version in the pom.xml
If it still happens, go through the Jira list[1] to see if there's an  
issue matching your problem.

thanks,
Robert

[1] https://jira.codehaus.org/browse/MRELEASE

Op Fri, 31 Oct 2014 16:41:04 +0100 schreef Leonie  
<le...@rmb.co.za>:

> Good day,
>
> I hope someone can assist. I have posted something, but did not get any
> reply. When running the release:branch, my branch gets created, but my  
> scn
> connection url in the trunk POM is not updating to point to the new  
> branch's
> URL.
>
> I tried to pinpoint the problem. I opened the POM in notepad ++ and ran  
> the
> mvn release:branch command. I could see the POM file updated when the  
> second
> cmd.exe ran, but when the third cmd.exe ran, the POM changed scm  
> connection
> url back to what it was before I tried to create the branch. Thanks in
> advance. I need a solution before Monday and have no idea what to do
> anymore.
> pr <http://maven.40175.n5.nabble.com/file/n5811978/Untitled.bmp> oblem. I
> can see that my POM file gets updated, b
>
>
>
> --
> View this message in context:  
> http://maven.40175.n5.nabble.com/mvn-release-branch-updating-POM-incorrectly-tp5811978.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

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