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

prepare tags the wrong source

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Auto Closed
    • 2.1
    • None
    • prepare-with-pom
    • None

    Description

      The use case is mostly defined here

      Here is our svn structure :

      trunk/
       +- docs/
       +- dev/
           +- project-parent/
               +- pom.xml
           +- project-war/
               +- pom.xml
      releases/
      

      When preparing the release (mvn release:prepare-with-pom), I want to tag trunk/dev/ into releases/project-<release-version>/.

      The parent pom.xml is like this :

      <build>
          <plugins>
              <plugin>
                  <artifactId>maven-release-plugin</artifactId>
                  <version>2.1</version>
                  <configuration>
                      <tagBase>http://svn.mycompany.com/svn/project/releases</tagBase>
                      <generateReleasePoms>false</generateReleasePoms>
                      <autoVersionSubmodules>true</autoVersionSubmodules>
                  </configuration>
              </plugin>
          </plugins>
      </build>
      
      <scm>
          <connection>scm:svn:http://svn.mycompany.com/svn/project/trunk/dev</connection>
          <developerConnection>scm:svn:http://svn.mycompany.com/svn/project/trunk/dev</developerConnection>
          <url>scm:svn:http://svn.mycompany.com/svn/project/trunk/dev</url>
      </scm>
      

      My working copy /home/user/project is checked out from http://svn.mycompany.com/svn/project/trunk/.

      When doing mvn release:prepare-with-pom -DdryRun=true, it says me that :

      [INFO] Full run would be tagging working copy /home/user/project/dev with label: 'project-<release-version>'
      

      But, when removing -DdryRun=true, here is what the plugin does :

      [INFO] Executing: /bin/sh -c cd /home/user/project/dev/project-parent && svn --non-interactive commit --file /tmp/maven-scm-1922580928.commit --targets /tmp/maven-scm-8496598021737984450-targets
      [INFO] Working directory: /home/user/project/dev/project-parent
      [INFO] Tagging release with the label project-<release-version>...
      [INFO] Executing: /bin/sh -c cd /home/user/project/dev && svn --non-interactive copy --file /tmp/maven-scm-982655546.commit --revision <revision> http://svn.mycompany.com/svn/project/trunk http://svn.mycompany.com/svn/project/releases/project-<release-version>
      [INFO] Working directory: /home/user/project/dev
      

      So, with dryRun we think that it is trunk/dev which will be tagged, and when doing a real prepare, it is finally trunk/ which is tagged, and this is not espected.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aogier Anthony Ogier
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: