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

Git clone fails during perform when using localCheckout

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.2.1, 2.2.2
    • None
    • Git, perform
    • None
    • openSUSE 12.1 x86_64

    Description

      I'm having the same setup as in MRELEASE-702 (which also seems to be related) with a repository containing a number of maven projects.

      Root
       |- parent
       |- project1
       |- project2
       \- etc, etc
      

      If I try to run a release on any of the projects, the prepare step is successful, but the perform step fails due to the clone failing when localCheckout is set to true, due to the fact that the plugin tries to clone the working directory, instead of the repository root. If I change the settings to use a push, and remote clone of the repository it works with the help of the workaround described in MRELEASE-702, but I would really prefer to just use my own repository without any push until the release has been confirmed to actually build, just to keep the remote clean.

      The log is as follows:

      nrgizer@sybarite:~/NetBeansProjects/project/parent> ~/apache-maven-3.0.3/bin/mvn release:prepare release:perform
      [INFO] Scanning for projects...
      [INFO]                                                                         
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Project :: Parent 1.1.1-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- maven-release-plugin:2.2.2:prepare (default-cli) @ project ---
      [INFO] Resuming release from phase 'scm-check-modifications'
      [INFO] Verifying that there are no local modifications...
      [INFO]   ignoring changes on: pom.xml.next, release.properties, pom.xml.releaseBackup, pom.xml.backup, pom.xml.branch, pom.xml.tag
      [INFO] Executing: /bin/sh -c cd /home/nrgizer/NetBeansProjects/project/parent && git status
      [INFO] Working directory: /home/nrgizer/NetBeansProjects/project/parent
      [INFO] Checking dependencies and plugins for snapshots ...
      What is the release version for "Project :: Parent"? (com.company:project) 1.1.1: : 
      What is SCM release tag or label for "Project :: Parent"? (com.company:project) project-1.1.1: : 
      What is the new development version for "Project :: Parent"? (com.company:project) 1.1.2-SNAPSHOT: : 
      [INFO] Transforming 'Project :: Parent'...
      [INFO] Not generating release POMs
      [INFO] Executing goals 'clean verify'...
      [WARNING] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance.
      [INFO] [INFO] Scanning for projects...
      [INFO] [INFO]                                                                         
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Building Project :: Parent 1.1.1
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] 
      [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ project ---
      [INFO] [INFO] 
      [INFO] [INFO] --- buildnumber-maven-plugin:1.0:create (default) @ project ---
      [INFO] [INFO] Checking for local modifications: skipped.
      [INFO] [INFO] Updating project files from SCM: skipped.
      [INFO] [INFO] Executing: /bin/sh -c cd /home/nrgizer/NetBeansProjects/project/parent && git show
      [INFO] [INFO] Working directory: /home/nrgizer/NetBeansProjects/project/parent
      [INFO] [INFO] Storing buildNumber: c743f2c2f36ee0a68639c3db25afed80a8703ecb at timestamp: 1336249665308
      [INFO] [INFO] Executing: /bin/sh -c cd /home/nrgizer/NetBeansProjects/project/parent && git show
      [INFO] [INFO] Working directory: /home/nrgizer/NetBeansProjects/project/parent
      [INFO] [INFO] Storing buildScmBranch: UNKNOWN
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] BUILD SUCCESS
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] [INFO] Total time: 1.609s
      [INFO] [INFO] Finished at: Sat May 05 23:27:45 EEST 2012
      [INFO] [INFO] Final Memory: 4M/74M
      [INFO] [INFO] ------------------------------------------------------------------------
      [INFO] Checking in modified POMs...
      [INFO] Executing: /bin/sh -c cd /home/nrgizer/NetBeansProjects/project/parent && git add -- pom.xml
      [INFO] Working directory: /home/nrgizer/NetBeansProjects/project/parent
      [INFO] Executing: /bin/sh -c cd /home/nrgizer/NetBeansProjects/project/parent && git status
      [INFO] Working directory: /home/nrgizer/NetBeansProjects/project/parent
      [INFO] Executing: /bin/sh -c cd /home/nrgizer/NetBeansProjects/project/parent && git commit --verbose -F /tmp/maven-scm-753073931.commit pom.xml
      [INFO] Working directory: /home/nrgizer/NetBeansProjects/project/parent
      [INFO] Tagging release with the label project-1.1.1...
      [INFO] Executing: /bin/sh -c cd /home/nrgizer/NetBeansProjects/project/parent && git tag -F /tmp/maven-scm-1966426677.commit project-1.1.1
      [INFO] Working directory: /home/nrgizer/NetBeansProjects/project/parent
      [INFO] Executing: /bin/sh -c cd /home/nrgizer/NetBeansProjects/project/parent && git ls-files
      [INFO] Working directory: /home/nrgizer/NetBeansProjects/project/parent
      [INFO] Transforming 'Project :: Parent'...
      [INFO] Not removing release POMs
      [INFO] Checking in modified POMs...
      [INFO] Executing: /bin/sh -c cd /home/nrgizer/NetBeansProjects/project/parent && git add -- pom.xml
      [INFO] Working directory: /home/nrgizer/NetBeansProjects/project/parent
      [INFO] Executing: /bin/sh -c cd /home/nrgizer/NetBeansProjects/project/parent && git status
      [INFO] Working directory: /home/nrgizer/NetBeansProjects/project/parent
      [INFO] Executing: /bin/sh -c cd /home/nrgizer/NetBeansProjects/project/parent && git commit --verbose -F /tmp/maven-scm-1509328988.commit pom.xml
      [INFO] Working directory: /home/nrgizer/NetBeansProjects/project/parent
      [INFO] Release preparation complete.
      [INFO] 
      [INFO] --- maven-release-plugin:2.2.2:perform (default-cli) @ project ---
      [INFO] Checking out the project to perform the release ...
      [INFO] Performing a LOCAL checkout from scm:git:file:///home/nrgizer/NetBeansProjects/project/parent
      [INFO] Executing: /bin/sh -c cd /home/nrgizer/NetBeansProjects/project/parent/target && git clone file:///home/nrgizer/NetBeansProjects/project/parent /home/nrgizer/NetBeansProjects/project/parent/target/checkout
      [INFO] Working directory: /home/nrgizer/NetBeansProjects/project/parent/target
      [ERROR] The git-clone command failed.
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 7.824s
      [INFO] Finished at: Sat May 05 23:27:45 EEST 2012
      [INFO] Final Memory: 10M/171M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.2:perform (default-cli) on project project: Unable to checkout from SCM
      [ERROR] Provider message:
      [ERROR] The git-clone command failed.
      [ERROR] Command output:
      [ERROR] fatal: '/home/nrgizer/NetBeansProjects/project/parent' does not appear to be a git repository
      [ERROR] fatal: The remote end hung up unexpectedly
      [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
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nrgizer Carl-Magnus Björkell
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: