You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "David SPORN (JIRA)" <ji...@codehaus.org> on 2015/03/12 07:33:18 UTC

[jira] (MRELEASE-701) maven:prepare failed with GIT SCM in multimodule project with quite same name

    [ https://jira.codehaus.org/browse/MRELEASE-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=364838#comment-364838 ] 

David SPORN commented on MRELEASE-701:
--------------------------------------

I have the same problem with version 2.5.1 of the plugin.

This is the same situation : a flat multimodule project
{noformat}
[root]
+---sporniket-core/pom.xml (parent pom)
+---sporniket-core-lang/pom.xml
+---sporniket-core-io/pom.xml
+---sporniket-core-ui/pom.xml
+---sporniket-core-ml/pom.xml
{noformat}


Step to reproduce : 
* clone this git repo : https://github.com/sporniket/core.git
* checkout commit b03bb9b911e854f926213dd766b85596d8f5c0a3
* run mvn release:prepare -DautoVersionSubmodules=true -DdevelopmentVersion=15.03.01-SNAPSHOT -DreleaseVersion=15.03.00 -DpushChanges=false -Dconnection=scm:git:file:///path/to/local/clone -DdevelopperConnection=scm:git:file:///path/to/local/clone




{panel:title=Excerpt of the log}
{noformat}
[INFO] Checking in modified POMs...
[INFO] Executing: /bin/sh -c cd /home/__data__dsporn/JavaStack/__src/ws_core/sporniket-core && git add -- pom.xml -lang/pom.xml -ml/pom.xml -io/pom.xml -ui/pom.xml
[INFO] Working directory: /home/__data__dsporn/JavaStack/__src/ws_core/sporniket-core
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] sporniket-core .................................... FAILURE [16.499s]
[INFO] sporniket-core-lang ............................... SKIPPED
[INFO] sporniket-core-ml ................................. SKIPPED
[INFO] sporniket-core-io ................................. SKIPPED
[INFO] sporniket-core-ui ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.098s
[INFO] Finished at: Mon Mar 09 06:55:46 CET 2015
[INFO] Final Memory: 16M/174M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.1:prepare (default-cli) on project sporniket-core: Unable to commit files
[ERROR] Provider message:
[ERROR] The git-add command failed.
[ERROR] Command output:
[ERROR] fatal: le chemin '-lang/pom.xml' ne correspond à aucun fichier
{noformat}
{panel}


> maven:prepare failed with GIT SCM in multimodule project with quite same name
> -----------------------------------------------------------------------------
>
>                 Key: MRELEASE-701
>                 URL: https://jira.codehaus.org/browse/MRELEASE-701
>             Project: Maven Release Plugin
>          Issue Type: Bug
>          Components: Git, prepare
>    Affects Versions: 2.2.1
>         Environment: Windows, Maven 3, GIT
>            Reporter: jurevert
>            Priority: Minor
>
> In multimodule projects have directory tree like :
> {code}
> SampleProject
> |-- pom.xml (Modules : SampleProjectEAR,SampleProjectWeb,SampleProjectCommons)
> SampleProjectEAR
> |-- pom.xml (Parent : SampleProject pom.xml)
> SampleProjectWeb
> |-- pom.xml (Parent : SampleProject pom.xml)
> SampleProjectCommons
> |-- pom.xml (Parent : SampleProject pom.xml)
> {code}
> While running :
> {code}
> mvn release:prepare
> {code}
> GIT will try to commit files under but the erroe bellow appear :
> {code}
> build	11-Aug-2011 11:04:42	[INFO] --- maven-release-plugin:2.2.1:prepare (default-cli) @ WelcomTutorial ---
> build	11-Aug-2011 11:04:44	[INFO] Resuming release from phase 'scm-commit-release'
> build	11-Aug-2011 11:04:44	[INFO] Checking in modified POMs...
> build	11-Aug-2011 11:04:44	[INFO] Executing: /bin/sh -c cd /app/DINB/bamboo-agent-home/xml-data/build-dir/WTUT-RELEASE-JOB1/SampleProject && git add -- pom.xml Commons/pom.xml Web/pom.xml EAR/pom.xml
> [...]
> build	11-Aug-2011 11:04:44	[INFO] SampleProject .................................... FAILURE [1.734s]
> [...]
> build	11-Aug-2011 11:04:44	[INFO] BUILD FAILURE
> [...]
> build	11-Aug-2011 11:04:44	[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.2.1:prepare (default-cli) on project SampleProject: Unable to commit files
> {code}
> The problem is that GIT is trying to add files :
> *Commons/pom.xml Web/pom.xml EAR/pom.xml*
> instead of
> [Path]/SampleProjectCommons/pom.xml [Path]/SampleProjectCommonsWeb/pom.xml [Path]/SampleProjectCommonsEAR/pom.xml
> If you rename the project *SampleProject*, the BUILD is succeed.
> Julien



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)