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

git push failed with commitByProject

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.5.2
    • Fix Version/s: None
    • Component/s: prepare
    • Labels:
      None

      Description

      I haven created three git projects to test the maven release with commitByProject=true.
      Each project has its own Maven pom.xml. One is a Maven Master containing the two others as modules.

      project 'tm' has 'p1' and 'p2' as modules.
      each project has its own git project.
      each pom.xml has its own scm url specified.

      This is the error line from the full log below: it takes the wrong url.

      [INFO] Working directory: C:\temp\p1
      [INFO] Executing: cmd.exe /X /C "git push git@10.141.86.1:dos/tm.git refs/heads/master:refs

      Here is the total log:

      >>
      mvn -s /c/ta35/workspaces/Pli2Java/Shark_Maven/settings.xml release:prepare -DcommitByProject=true -DdevelopmentVersion=0.0.2.0-SNAPSHOT -DreleaseVersion=0.0.1.0 --batch-mode > t
      >>
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Build Order:
      [INFO]
      [INFO] p1
      [INFO] p2
      [INFO] tm
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building tm 0.0.1.0
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] — maven-release-plugin:2.5.2:prepare (default-cli) @ tm —
      [INFO] Resuming release from phase 'map-release-versions'
      [INFO] Transforming 'p1'...
      [INFO] Transforming 'p2'...
      [INFO] Transforming 'tm'...
      [INFO] Not generating release POMs
      [INFO] Executing goals 'clean verify'...
      [INFO] [INFO] Scanning for projects...
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Reactor Build Order:
      [INFO] [INFO]
      [INFO] [INFO] p1
      [INFO] [INFO] p2
      [INFO] [INFO] tm
      [INFO] [INFO]
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Building p1 0.0.1.0
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO]
      [INFO] [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ p1 —
      [INFO] [INFO]
      [INFO] [INFO] — buildnumber-maven-plugin:1.4:create (default) @ p1 —
      [INFO] [INFO] Executing: cmd.exe /X /C "git rev-parse --verify HEAD"
      [INFO] [INFO] Working directory: C:\temp\p1
      [INFO] [INFO] Storing buildNumber: bab936cc352701fe2062a11eea68993d16c7ec0a at timestamp: 1502962833556
      [INFO] [INFO] Storing buildScmBranch: master
      [INFO] [INFO]
      [INFO] [INFO] — git-commit-id-plugin:2.2.1:revision (get-the-git-infos) @ p1 —
      [INFO] [INFO]
      [INFO] [INFO] — maven-site-plugin:3.5:attach-descriptor (attach-descriptor) @ p1 —
      [INFO] [INFO]
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Building p2 0.0.1.0
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO]
      [INFO] [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ p2 —
      [INFO] [INFO]
      [INFO] [INFO] — buildnumber-maven-plugin:1.4:create (default) @ p2 —
      [INFO] [INFO] Executing: cmd.exe /X /C "git rev-parse --verify HEAD"
      [INFO] [INFO] Working directory: C:\temp\p2
      [INFO] [INFO] Storing buildNumber: 53349f4bc4586b65f58df04833c89b48b09a82bd at timestamp: 1502962834475
      [INFO] [INFO] Storing buildScmBranch: master
      [INFO] [INFO]
      [INFO] [INFO] — git-commit-id-plugin:2.2.1:revision (get-the-git-infos) @ p2 —
      [INFO] [INFO]
      [INFO] [INFO] — maven-site-plugin:3.5:attach-descriptor (attach-descriptor) @ p2 —
      [INFO] [INFO]
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Building tm 0.0.1.0
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO]
      [INFO] [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ tm —
      [INFO] [INFO]
      [INFO] [INFO] — buildnumber-maven-plugin:1.4:create (default) @ tm —
      [INFO] [INFO] Executing: cmd.exe /X /C "git rev-parse --verify HEAD"
      [INFO] [INFO] Working directory: C:\temp\tm
      [INFO] [INFO] Storing buildNumber: 1146281bd768261cc274ab3eb9bf8d68cdde9563 at timestamp: 1502962834550
      [INFO] [INFO] Storing buildScmBranch: master
      [INFO] [INFO]
      [INFO] [INFO] — git-commit-id-plugin:2.2.1:revision (get-the-git-infos) @ tm —
      [INFO] [INFO]
      [INFO] [INFO] — maven-site-plugin:3.5:attach-descriptor (attach-descriptor) @ tm —
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Reactor Summary:
      [INFO] [INFO]
      [INFO] [INFO] p1 ................................................. SUCCESS [ 1.469 s]
      [INFO] [INFO] p2 ................................................. SUCCESS [ 0.076 s]
      [INFO] [INFO] tm ................................................. SUCCESS [ 0.082 s]
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] BUILD SUCCESS
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Total time: 1.864 s
      [INFO] [INFO] Finished at: 2017-08-17T11:40:34+02:00
      [INFO] [INFO] Final Memory: 14M/309M
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] Checking in modified POMs...
      [INFO] Executing: cmd.exe /X /C "git add – pom.xml"
      [INFO] Working directory: C:\temp\p1
      [INFO] Executing: cmd.exe /X /C "git rev-parse --show-toplevel"
      [INFO] Working directory: C:\temp\p1
      [INFO] Executing: cmd.exe /X /C "git status --porcelain ."
      [INFO] Working directory: C:\temp\p1
      [WARNING] Ignoring unrecognized line: ?? pom.xml.releaseBackup
      [INFO] Executing: cmd.exe /X /C "git commit --verbose -F C:\Users\computer\AppData\Local\Temp\maven-scm-1556290740.commit pom.xml"
      [INFO] Working directory: C:\temp\p1
      [INFO] Executing: cmd.exe /X /C "git symbolic-ref HEAD"
      [INFO] Working directory: C:\temp\p1
      [INFO] Executing: cmd.exe /X /C "git push git@10.141.86.1:dos/tm.git refs/heads/master:refs/heads/master"
      [INFO] Working directory: C:\temp\p1
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO]
      [INFO] p1 ................................................. SKIPPED
      [INFO] p2 ................................................. SKIPPED
      [INFO] tm ................................................. FAILURE [ 4.082 s]
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 4.384 s
      [INFO] Finished at: 2017-08-17T11:40:35+02:00
      [INFO] Final Memory: 12M/245M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.2:prepare (default-cli) on project tm: Unable to commit files
      [ERROR] Provider message:
      [ERROR] The git-push command failed.
      [ERROR] Command output:
      [ERROR] To git@10.141.86.1:dos/tm.git
      [ERROR] ! [rejected] master -> master (fetch first)
      [ERROR] error: failed to push some refs to 'git@10.141.86.1:dos/tm.git'
      [ERROR] hint: Updates were rejected because the remote contains work that you do
      [ERROR] hint: not have locally. This is usually caused by another repository pushing
      [ERROR] hint: to the same ref. You may want to first integrate the remote changes
      [ERROR] hint: (e.g., 'git pull ...') before pushing again.
      [ERROR] hint: See the 'Note about fast-forwards' in 'git push --help' for details.
      [ERROR] -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
      [ERROR]
      [ERROR] After correcting the problems, you can resume the build with the command
      [ERROR] mvn <goals> -rf :tm

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              stefandotti Stefan Dotti
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: