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

Git relative pathing broken with release plugin

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: Backlog
    • Component/s: Git, prepare
    • Labels:
      None
    • Environment:
      windows xp, service pack 2
    • Number of attachments :
      2

      Description

      i have a multimodule project, and when i try to do a release, i get everything working fine until the end. It seems to think for some reason that I am at the root of my scm tree. The repo i have to work in has several projects, and mine is in a subdirectory - domains/redemption. the plugin appears to try to check in my submodules at my current location instead of my scm root.

      COMMAND:
      mvn release:prepare -DpreparationGoals="clean install" -DskipTests -DautoVersionSubmodules=true

      END OF OUTPUT:
      [INFO] [INFO] Reactor Summary:
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Redemption Parent POM ................................. SUCCESS [2.595s]
      [INFO] [INFO] Redemption Runtime Confguration ....................... SUCCESS [3.531s]
      [INFO] [INFO] Redemption Service Metadata ........................... SUCCESS [18.816s]
      [INFO] [INFO] Redemption Model ...................................... SUCCESS [35.693s]
      [INFO] [INFO] Redemption DAO ........................................ SUCCESS [41.770s]
      [INFO] [INFO] Redemption Service Implementation ..................... SUCCESS [17.517s]
      [INFO] [INFO] crm :: guest :: redemption :: ESB :: Parent POM ....... SUCCESS [0.016s]
      [INFO] [INFO] crm :: guest :: redemption :: ESB :: XSLT ............. SUCCESS [5.469s]
      [INFO] [INFO] crm :: guest :: redemption :: ESB :: EIP .............. SUCCESS [0.343s]
      [INFO] [INFO] crm :: guest :: redemption :: ESB :: Version Router ... SUCCESS [3.157s]
      [INFO] [INFO] crm :: guest :: redemption :: ESB :: Binding Component :: Service Unit  SUCCESS [3.656s]
      [INFO] [INFO] crm :: guest :: redemption :: ESB :: Service Assembly . SUCCESS [3.516s]
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] BUILD SUCCESSFUL
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Total time: 2 minutes 26 seconds
      [INFO] [INFO] Finished at: Tue Jul 27 17:18:02 EDT 2010
      [INFO] [INFO] Final Memory: 116M/254M
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] Checking in modified POMs...
      [INFO] Executing: cmd.exe /X /C "git add pom.xml redemption-conf\pom.xml redemption-metadata\pom.xml redemption-model\pom.xml rede
      mption-dao\pom.xml redemption-impl\pom.xml redemption-esb\pom.xml redemption-esb\redemption-xslt\pom.xml redemption-esb\redemption
      -eip\pom.xml redemption-esb\redemption-router\pom.xml redemption-esb\redemption-bc-su\pom.xml redemption-esb\redemption-sa\pom.xml
      "
      [INFO] Working directory: D:\workspaces\crm-dev\domains\redemption
      [INFO] Executing: cmd.exe /X /C "git status"
      [INFO] Working directory: D:\workspaces\crm-dev\domains\redemption
      [INFO] Executing: cmd.exe /X /C "git commit --verbose -F D:\DOCUME~1\sandozm\LOCALS~1\Temp\maven-scm-1862033505.commit pom.xml red
      emption-conf\pom.xml redemption-metadata\pom.xml redemption-model\pom.xml redemption-dao\pom.xml redemption-impl\pom.xml redemptio
      n-esb\pom.xml redemption-esb\redemption-xslt\pom.xml redemption-esb\redemption-eip\pom.xml redemption-esb\redemption-router\pom.xm
      l redemption-esb\redemption-bc-su\pom.xml redemption-esb\redemption-sa\pom.xml"
      [INFO] Working directory: D:\workspaces\crm-dev\domains\redemption
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Unable to commit files
      Provider message:
      The git-commit command failed.
      Command output:
      error: pathspec 'redemption-conf\pom.xml' did not match any file(s) known to git.
      error: pathspec 'redemption-metadata\pom.xml' did not match any file(s) known to git.
      error: pathspec 'redemption-model\pom.xml' did not match any file(s) known to git.
      error: pathspec 'redemption-dao\pom.xml' did not match any file(s) known to git.
      error: pathspec 'redemption-impl\pom.xml' did not match any file(s) known to git.
      error: pathspec 'redemption-esb\pom.xml' did not match any file(s) known to git.
      error: pathspec 'redemption-esb\redemption-xslt\pom.xml' did not match any file(s) known to git.
      error: pathspec 'redemption-esb\redemption-eip\pom.xml' did not match any file(s) known to git.
      error: pathspec 'redemption-esb\redemption-router\pom.xml' did not match any file(s) known to git.
      error: pathspec 'redemption-esb\redemption-bc-su\pom.xml' did not match any file(s) known to git.
      error: pathspec 'redemption-esb\redemption-sa\pom.xml' did not match any file(s) known to git.
      
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 3 minutes 27 seconds
      [INFO] Finished at: Tue Jul 27 17:18:09 EDT 2010
      [INFO] Final Memory: 43M/254M
      [INFO] ------------------------------------------------------------------------
      D:\workspaces\crm-dev\domains\redemption>
      
      1. MRELEASE-581.patch
        6 kB
        Mark Struberg

        Issue Links

          Activity

          Hide
          Matthew Sandoz added a comment -

          the issue appears to be with cygwin git, which allows backslashes in the add command but not the commit or status command.

          [INFO] Executing: cmd.exe /X /C "git add – pom.xml redemption-conf\pom.xml redemption-metadata\pom.xml redemption-model\pom.xml r
          edemption-dao\pom.xml redemption-impl\pom.xml redemption-esb\pom.xml redemption-esb\redemption-xslt\pom.xml redemption-esb\redempt
          ion-eip\pom.xml redemption-esb\redemption-router\pom.xml redemption-esb\redemption-bc-su\pom.xml redemption-esb\redemption-sa\pom.
          xml"
          [INFO] Working directory: D:\workspaces\crm-dev\domains\redemption

          [INFO] Executing: cmd.exe /X /C "git commit --verbose -F D:\DOCUME~1\sandozm\LOCALS~1\Temp\maven-scm-2012249302.commit pom.xml red
          emption-conf\pom.xml redemption-metadata\pom.xml redemption-model\pom.xml redemption-dao\pom.xml redemption-impl\pom.xml redemptio
          n-esb\pom.xml redemption-esb\redemption-xslt\pom.xml redemption-esb\redemption-eip\pom.xml redemption-esb\redemption-router\pom.xm
          l redemption-esb\redemption-bc-su\pom.xml redemption-esb\redemption-sa\pom.xml"
          [INFO] Working directory: D:\workspaces\crm-dev\domains\redemption
          [INFO] ------------------------------------------------------------------------
          [ERROR] BUILD FAILURE

          i have to run the build from CMD because if I run it from cyg-bash, i get errors like:

          [INFO] Working directory: d:\workspaces\crm-dev\domains\redemption
          [INFO] ------------------------------------------------------------------------
          [ERROR] BUILD FAILURE
          [INFO] ------------------------------------------------------------------------
          [INFO] Unable to commit files
          Provider message:
          The git-add command failed.
          Command output:
          fatal: pathspec 'domains/redemption/D:\workspaces\crm-dev\domains\redemption\redemption-conf\pom.xml' did not match any files

          the upshot of all this is that release appears to take insufficient care in putting together the paths of the required artifacts and as a result is subject to brittleness in the face of different environmental setups.

          Show
          Matthew Sandoz added a comment - the issue appears to be with cygwin git, which allows backslashes in the add command but not the commit or status command. [INFO] Executing: cmd.exe /X /C "git add – pom.xml redemption-conf\pom.xml redemption-metadata\pom.xml redemption-model\pom.xml r edemption-dao\pom.xml redemption-impl\pom.xml redemption-esb\pom.xml redemption-esb\redemption-xslt\pom.xml redemption-esb\redempt ion-eip\pom.xml redemption-esb\redemption-router\pom.xml redemption-esb\redemption-bc-su\pom.xml redemption-esb\redemption-sa\pom. xml" [INFO] Working directory: D:\workspaces\crm-dev\domains\redemption [INFO] Executing: cmd.exe /X /C "git commit --verbose -F D:\DOCUME~1\sandozm\LOCALS~1\Temp\maven-scm-2012249302.commit pom.xml red emption-conf\pom.xml redemption-metadata\pom.xml redemption-model\pom.xml redemption-dao\pom.xml redemption-impl\pom.xml redemptio n-esb\pom.xml redemption-esb\redemption-xslt\pom.xml redemption-esb\redemption-eip\pom.xml redemption-esb\redemption-router\pom.xm l redemption-esb\redemption-bc-su\pom.xml redemption-esb\redemption-sa\pom.xml" [INFO] Working directory: D:\workspaces\crm-dev\domains\redemption [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE i have to run the build from CMD because if I run it from cyg-bash, i get errors like: [INFO] Working directory: d:\workspaces\crm-dev\domains\redemption [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Unable to commit files Provider message: The git-add command failed. Command output: fatal: pathspec 'domains/redemption/D:\workspaces\crm-dev\domains\redemption\redemption-conf\pom.xml' did not match any files the upshot of all this is that release appears to take insufficient care in putting together the paths of the required artifacts and as a result is subject to brittleness in the face of different environmental setups.
          Hide
          Adrian Stabiszewski added a comment -

          This is a patch for this issue. It will create relative paths for all files that are added to git.
          Hope you can add this to the next release. Thanks.

          Show
          Adrian Stabiszewski added a comment - This is a patch for this issue. It will create relative paths for all files that are added to git. Hope you can add this to the next release. Thanks.
          Hide
          Mark Struberg added a comment -

          might this be a Windows pathing problem? I never suffered from such problems under Linux and OSX!

          Show
          Mark Struberg added a comment - might this be a Windows pathing problem? I never suffered from such problems under Linux and OSX!
          Hide
          Marvin Froeder added a comment -

          this only happen on windows when using cygwin.

          Show
          Marvin Froeder added a comment - this only happen on windows when using cygwin.
          Hide
          Mark Struberg added a comment -

          This patch should fix the issue. I'll do a few tests by trying a local release of Apache DeltaSpike.
          If anyone could give it a try as well then I'd be more than happy!

          Show
          Mark Struberg added a comment - This patch should fix the issue. I'll do a few tests by trying a local release of Apache DeltaSpike. If anyone could give it a try as well then I'd be more than happy!
          Hide
          Arnaud Heritier added a comment -

          How was organized your project ?
          You add some relative path between the reactor/parent and its modules with some .. (to have the parent as the same level than modules ?)

          Show
          Arnaud Heritier added a comment - How was organized your project ? You add some relative path between the reactor/parent and its modules with some .. (to have the parent as the same level than modules ?)
          Hide
          Marvin Froeder added a comment -

          My project is a simple tree...
          https://github.com/velo/kiss

          Show
          Marvin Froeder added a comment - My project is a simple tree... https://github.com/velo/kiss
          Hide
          Arnaud Heritier added a comment -

          ok thus it is another problem to solve than the one I saw today (similar to this one, the release plugin is dying with such errors if it's not a classical inheritance)
          Marvin Froeder were you able to test the patch proposed by Mark Struberg ?

          Show
          Arnaud Heritier added a comment - ok thus it is another problem to solve than the one I saw today (similar to this one, the release plugin is dying with such errors if it's not a classical inheritance) Marvin Froeder were you able to test the patch proposed by Mark Struberg ?

            People

            • Assignee:
              Mark Struberg
              Reporter:
              Matthew Sandoz
            • Votes:
              12 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated: