Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-305

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-beta-7
    • 2.0-beta-8
    • None
    • None
    • Maven 2.0.8, JDK 1.6.0_01

    Description

      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

      Attachments

        1. TestRelease.zip
          5 kB
          Boris Maras
        2. generated child pom.xml.jpg
          44 kB
          Boris Maras

        Issue Links

          Activity

            People

              oching Maria Odea B. Ching
              bmaras Boris Maras
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: