release:prepare forgets a slash when changing the <scm> urls
------------------------------------------------------------

                 Key: MRELEASE-305
                 URL: http://jira.codehaus.org/browse/MRELEASE-305
             Project: Maven 2.x Release Plugin
          Issue Type: Bug
    Affects Versions: 2.0-beta-7
         Environment: Maven 2.0.8, JDK 1.6.0_01
            Reporter: Boris Maras
         Attachments: TestRelease.zip

In certain circumstances, the goal release:prepare incorrectly modifies the 
pom.xml that is commited in the tag.

This goal is supposed to change the URLs in the <scm> part of the pom.xml 
files, to reflect the commited tag.
For example, if you release a 1.2 version, it should replace 
scm:svn:svn://ntmestest01/TESTSVN14/testrelease/trunk/child/ with 
scm:svn:svn://ntmestest01/TESTSVN14/testrelease/tags/TestRelease-1.2/child

In the attached test-case, you will see that the URL for the "child" module is 
changed to 
scm:svn:svn://ntmestest01/TESTSVN14/testrelease/tags/TestRelease-1.2child : a 
slash is missing between the tag name, and the module name.
To reproduce, you need to commit that files on a scm, and run "mvn 
release:prepare". It will tag a version with this wrong URL for the child 
module.

It seems to occur only with modules (the URLs in the master-pom are correct). 
It seems to occur ONLY if the master-pom scm url ends with a slash.

So a workaround is simply to remove the last slash of the urls in the 
master-pom (they can be left in the child pom). This way, the generated poms 
are correct.

I suppose there is a little bug in the string manipulation

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to