Could not release project due to GIT clone error when working in sub-directory ------------------------------------------------------------------------------
Key: MRELEASE-702 URL: https://jira.codehaus.org/browse/MRELEASE-702 Project: Maven 2.x Release Plugin Issue Type: Bug Components: Git Affects Versions: 2.2.1 Environment: LINUX, GIT, Maven 3.X, maven-release-plugin:2.2.1:perform Reporter: jurevert We have multi modules project structure like : {code} ParentPom |-- pom.xml (Modules : SampleProjectEAR,SampleProjectWeb,SampleProjectCommons) SampleProjectEAR |-- pom.xml (Parent : ParentPom pom.xml) SampleProjectWeb |-- pom.xml (Parent : ParentPom pom.xml) SampleProjectCommons |-- pom.xml (Parent : ParentPom pom.xml) {code} Our goal is to release the project. Th eparent project is in a subdir. When running the following command from root directory; we've got the following error : {code} mvn release:clean release:prepare release:perform -B -U -X -f ParentPom/pom.xml [...] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.1:perform (default-cli) on project WelcomTutorial: Unable to checkout from SCM [ERROR] Provider message: [ERROR] The git-clone command failed. [ERROR] Command output: [ERROR] fatal: '/app/DINB/bamboo-agent-home/xml-data/build-dir/WTUT-RELEASE-JOB1/ParentPom' does not appear to be a git repository [ERROR] fatal: The remote end hung up unexpectedly [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.1:perform (default-cli) on project WelcomTutorial: Unable to checkout from SCM Provider message: The git-clone command failed. Command output: fatal: '/app/DINB/bamboo-agent-home/xml-data/build-dir/WTUT-RELEASE-JOB1/ParentPom' does not appear to be a git repository fatal: The remote end hung up unexpectedly at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoFailureException: Unable to checkout from SCM Provider message: The git-clone command failed. Command output: fatal: '/app/DINB/bamboo-agent-home/xml-data/build-dir/WTUT-RELEASE-JOB1/ParentPom' does not appear to be a git repository fatal: The remote end hung up unexpectedly at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:140) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: org.apache.maven.shared.release.scm.ReleaseScmCommandException: Unable to checkout from SCM Provider message: The git-clone command failed. Command output: fatal: '/app/DINB/bamboo-agent-home/xml-data/build-dir/WTUT-RELEASE-JOB1/ParentPom' does not appear to be a git repository fatal: The remote end hung up unexpectedly at org.apache.maven.shared.release.phase.CheckoutProjectFromScm.execute(CheckoutProjectFromScm.java:196) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:346) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:293) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:272) at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:132) ... 21 more [ERROR] [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 {code} As explain in this BAMBOO ticket https://jira.atlassian.com/browse/BAM-9513 ; when overriding the location of the pom.xml, it will set the working directory to be that of the pom.xml rather than that of the current working directory. Julien -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira