Maven Release Plugin
  1. Maven Release Plugin
  2. MRELEASE-727

release plugin uses wrong checkout directory

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.2, 2.2.2
    • Fix Version/s: 2.3
    • Component/s: perform
    • Labels:
      None
    • Environment:
      mvn 3.0.3

      Description

      When performing a release build on a multi module project, the plugin uses a wrong checkout directory and therefore is unable to perform the release.
      I tested this with both version 2.2 and 2.2.2

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.2:perform (default-cli) on project test_multi_parent: Error executing Maven. Working directory "/Users/domi/work/ws/sts_0/test_multi_parent/target/checkout/test_multi_parent/test_multi_parent" does not exist! -> [Help 1]

      We use flat project structure (where parent and modul project are in the same directory)
      The SVN Repo looks like this:

      .../svnrepos/KUQ/trunk/test_multi_parent
      .../svnrepos/KUQ/trunk/test_multi_module1

      I'll attache a minimal test project to reproduce it and a file containing the whole log output for release:prepare and release:perform

      To reproduce the problem:

      • adjust the SVN paths in the pom.xml
      • checkin to SVN
      • release:prepare
      • release:perform -Dgoals=install
      1. flat-project-layout.patch
        0.9 kB
        Dominik Richner
      2. MRELEASE-727.patch
        1.0 kB
        Mark Struberg
      3. release_failed.txt
        7 kB
        Dominik Richner
      4. testproject.zip
        13 kB
        Dominik Richner

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          25d 6h 48m 1 Olivier Lamy (*$^¨%`£) 16/Feb/12 15:34
          Closed Closed Reopened Reopened
          73d 21h 34m 1 Mark Struberg 30/Apr/12 14:09
          Reopened Reopened Closed Closed
          2h 53m 1 Mark Struberg 30/Apr/12 17:03
          Mark Thomas made changes -
          Workflow jira [ 12962225 ] Default workflow, editable Closed status [ 12999936 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 00:52:26 UTC 2015 [ 1428281546237 ]
          Mark Thomas made changes -
          Workflow jira [ 12724540 ] Default workflow, editable Closed status [ 12763741 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 12:15:05 UTC 2015 [ 1428236105845 ]
          Hide
          Mark Struberg added a comment -

          yes, please create a new one. Do you folks really still use CVS? CVS is dead since 2006 ^^

          Show
          Mark Struberg added a comment - yes, please create a new one. Do you folks really still use CVS? CVS is dead since 2006 ^^
          Hide
          Sylvain Laurent added a comment -

          It still does not work with CVS : only the current project is checked out directly in "target/checkout" (so, the tagged pom.xml is created in target/checkout). And then mvn complains that the directory target/checkout/parentproject does not exist.

          I cannot reopen this issue, it seems I don't have the rights in JIRA... Should I create a new issue ?

          Show
          Sylvain Laurent added a comment - It still does not work with CVS : only the current project is checked out directly in "target/checkout" (so, the tagged pom.xml is created in target/checkout). And then mvn complains that the directory target/checkout/parentproject does not exist. I cannot reopen this issue, it seems I don't have the rights in JIRA... Should I create a new issue ?
          Philipp Paland made changes -
          Link This issue duplicates MRELEASE-725 [ MRELEASE-725 ]
          Mark Struberg made changes -
          Link This issue relates to MRELEASE-740 [ MRELEASE-740 ]
          Mark Struberg made changes -
          Resolution Fixed [ 1 ]
          Status Reopened [ 4 ] Closed [ 6 ]
          Hide
          Mark Struberg added a comment -

          should now finally be fixed. Please reopen if there is still a scenario left which we didn't think about carefully enough.

          Show
          Mark Struberg added a comment - should now finally be fixed. Please reopen if there is still a scenario left which we didn't think about carefully enough.
          Hide
          Mark Struberg added a comment -

          fix committed in r1332385.

          I'll now only do the pom scan if the SCM itself doesn't offer a relativePath.

          Show
          Mark Struberg added a comment - fix committed in r1332385. I'll now only do the pom scan if the SCM itself doesn't offer a relativePath.
          Mark Struberg made changes -
          Attachment MRELEASE-727.patch [ 59744 ]
          Hide
          Mark Struberg added a comment -

          Hi folks!

          Could you please try the attached patch?
          This version works with GIT and hg again and should also do for SVN. txs!

          Show
          Mark Struberg added a comment - Hi folks! Could you please try the attached patch? This version works with GIT and hg again and should also do for SVN. txs!
          Mark Struberg made changes -
          Status Closed [ 6 ] Reopened [ 4 ]
          Resolution Fixed [ 1 ]
          Hide
          Mark Struberg added a comment -

          unfortunately this breaks SCMs which don't support sparse checkout, like hg and GIT.
          We need to find a solution which works for both.

          Show
          Mark Struberg added a comment - unfortunately this breaks SCMs which don't support sparse checkout, like hg and GIT. We need to find a solution which works for both.
          Hide
          Robert Scholte added a comment -

          Snapshot is available at https://repository.apache.org/content/repositories/snapshots/org/apache/maven/plugins/maven-release-plugin/
          There are some critical issues related to SCM, so I'd like to wait to scm-1.7

          Show
          Robert Scholte added a comment - Snapshot is available at https://repository.apache.org/content/repositories/snapshots/org/apache/maven/plugins/maven-release-plugin/ There are some critical issues related to SCM, so I'd like to wait to scm-1.7
          Hide
          Marc added a comment - - edited

          Is there a release date yet?

          I configured our nexus to use apache-snapshots but I cannot find 2.3-SNAPSHOT. Is this plugin hosted somewhere else?
          Thanks

          Show
          Marc added a comment - - edited Is there a release date yet? I configured our nexus to use apache-snapshots but I cannot find 2.3-SNAPSHOT. Is this plugin hosted somewhere else? Thanks
          Hide
          Robert Scholte added a comment -

          Latest release was 2.2.2, 2.3 hasn't been released yet. You could try the 2.3-SNAPSHOT

          Show
          Robert Scholte added a comment - Latest release was 2.2.2, 2.3 hasn't been released yet. You could try the 2.3-SNAPSHOT
          Hide
          L. Compère added a comment -

          Hi all!

          I'm using maven 2.2.1 with maven-release-plugin in version 2.2.2 and am getting the problem initially mentioned "When performing a release build on a multi module project, the plugin uses a wrong checkout directory and therefore is unable to perform the release".

          Is there a maven-release-plugin version I can use which fixes the problem?

          I can't seem to find version 2.2.3.

          thanks!

          Show
          L. Compère added a comment - Hi all! I'm using maven 2.2.1 with maven-release-plugin in version 2.2.2 and am getting the problem initially mentioned "When performing a release build on a multi module project, the plugin uses a wrong checkout directory and therefore is unable to perform the release". Is there a maven-release-plugin version I can use which fixes the problem? I can't seem to find version 2.2.3. thanks!
          Robert Scholte made changes -
          Fix Version/s 2.2.3 [ 18334 ]
          Fix Version/s 2.3 [ 17453 ]
          Olivier Lamy (*$^¨%`£) made changes -
          Assignee Olivier Lamy [ olamy ]
          Fix Version/s 2.3 [ 17453 ]
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Hide
          Olivier Lamy (*$^¨%`£) added a comment -

          fixed r1245192.
          Thanks!

          Show
          Olivier Lamy (*$^¨%`£) added a comment - fixed r1245192. Thanks!
          Dominik Richner made changes -
          Field Original Value New Value
          Attachment flat-project-layout.patch [ 58837 ]
          Hide
          Dominik Richner added a comment -

          This patch fixes the issue for flat project layouts.
          All tests still run successfully.

          All I did was to remove a line in the current RunPerformGoalsPhase code. It was assumed, that if the parent pom was in a subdirectory, then the SCM checkout directory would be in the parent directory if that pom, but for flat projects, that's not right...

          Show
          Dominik Richner added a comment - This patch fixes the issue for flat project layouts. All tests still run successfully. All I did was to remove a line in the current RunPerformGoalsPhase code. It was assumed, that if the parent pom was in a subdirectory, then the SCM checkout directory would be in the parent directory if that pom, but for flat projects, that's not right...
          Dominik Richner created issue -

            People

            • Assignee:
              Olivier Lamy (*$^¨%`£)
              Reporter:
              Dominik Richner
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development