apache / apache/maven-release

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

Open
#932 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
128
Forks
145
Avg merge
7h 7m
Merged PRs (30d)
3

Description

**[jurevert](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jurevert)** opened **[MRELEASE-701](https://issues.apache.org/jira/browse/MRELEASE-701?redirect=false)** and commented

In multimodule projects have directory tree like :

```
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)
```

While running :

```
mvn release:prepare
```

GIT tries to commit files under but the error below appears:

```
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
```

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

---

**Affects:** 2.2.1

**Issue Links:**
- [SCM-695](https://issues.apache.org/jira/browse/SCM-695) Mvn release plugin problems with too many - in name
(_**"depends upon"**_)

3 votes, 4 watchers

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.