apache / apache/maven-release

[MRELEASE-944] release:prepare fails with module project on git

Open
#1,151 2 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

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

I have a module project and use maven with cygwin, which has worked fine so far for simple projects. With the module project `mvn release:prepare` fails to checkin the modified poms:

```
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "git add -- pom.xml poms\webfilebrowser\pom.xml poms\cds\pom.xml poms\sso-core\pom.xml poms\sso-fp\pom.xml poms\sso-filter\pom.xml"
[INFO] Working directory: C:\eclipse-workspace\webfilebrowser
[INFO] Executing: cmd.exe /X /C "git rev-parse --show-toplevel"
[INFO] Working directory: C:\eclipse-workspace\webfilebrowser
[INFO] Executing: cmd.exe /X /C "git status --porcelain ."
[INFO] Working directory: C:\eclipse-workspace\webfilebrowser
[WARNING] Ignoring unrecognized line: ?? pom.xml.releaseBackup
[WARNING] Ignoring unrecognized line: ?? poms/cds/pom.xml.releaseBackup
[WARNING] Ignoring unrecognized line: ?? poms/sso-core/pom.xml.releaseBackup
[WARNING] Ignoring unrecognized line: ?? poms/sso-filter/pom.xml.releaseBackup
[WARNING] Ignoring unrecognized line: ?? poms/sso-fp/pom.xml.releaseBackup
[WARNING] Ignoring unrecognized line: ?? poms/webfilebrowser/pom.xml.releaseBackup
[WARNING] Ignoring unrecognized line: ?? release.properties
[INFO] Tagging release with the label wfb-1.2.3...
[INFO] Executing: cmd.exe /X /C "git tag -F C:\Users\lemkemch\maven-scm-343720559.commit wfb-1.2.3"
[INFO] Working directory: C:\ECLIPSE-WORKSPACE\webfilebrowser
[INFO] Executing: cmd.exe /X /C "git push http://webtech-scm.schaeffler.com:8056/git/webfilebrowser.git refs/tags/wfb-1.2.3"
[INFO] Working directory: C:\ECLIPSE-WORKSPACE\webfilebrowser
[INFO] Executing: cmd.exe /X /C "git ls-files"
[INFO] Working directory: C:\ECLIPSE-WORKSPACE\webfilebrowser
[INFO] Transforming 'wfb'...
[INFO] Transforming 'webfilebrowser'...
[INFO] Transforming 'cds'...
[INFO] Transforming 'sso-core'...
[INFO] Transforming 'sso-fp'...
[INFO] Transforming 'sso-filter'...
[INFO] Not removing release POMs
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "git add -- pom.xml poms\webfilebrowser\pom.xml poms\cds\pom.xml poms\sso-core\pom.xml poms\sso-fp\pom.xml poms\sso-filter\pom.xml"
[INFO] Working directory: C:\eclipse-workspace\webfilebrowser
[INFO] Executing: cmd.exe /X /C "git rev-parse --show-toplevel"
[INFO] Working directory: C:\eclipse-workspace\webfilebrowser
[INFO] Executing: cmd.exe /X /C "git status --porcelain ."
[INFO] Working directory: C:\eclipse-workspace\webfilebrowser
[WARNING] Ignoring unrecognized line: ?? pom.xml.releaseBackup
[WARNING] Ignoring unrecognized line: ?? poms/cds/pom.xml.releaseBackup
[WARNING] Ignoring unrecognized line: ?? poms/sso-core/pom.xml.releaseBackup
[WARNING] Ignoring unrecognized line: ?? poms/sso-filter/pom.xml.releaseBackup
[WARNING] Ignoring unrecognized line: ?? poms/sso-fp/pom.xml.releaseBackup
[WARNING] Ignoring unrecognized line: ?? poms/webfilebrowser/pom.xml.releaseBackup
[WARNING] Ignoring unrecognized line: ?? release.properties
[INFO] Release preparation complete.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] wfb ............................................... SUCCESS [1:24.734s]
[INFO] webfilebrowser .................................... SKIPPED
[INFO] cds ............................................... SKIPPED
[INFO] sso-core .......................................... SKIPPED
[INFO] sso-fp ............................................ SKIPPED
[INFO] sso-filter ........................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:24.971s
[INFO] Finished at: Mon Mar 07 11:30:27 CET 2016
[INFO] Final Memory: 7M/23M
[INFO] ------------------------------------------------------------------------
```

Obviously the git command above uses a wrong path separator. git is from cygwin, there is no difference if I run mvn in a cygwin shell or a cmd prompt created from cygwin (not cmd window).

And here is the mess left behind:

```
C:\eclipse-workspace\webfilebrowser>git st
git st
On branch master
Your branch is ahead of 'origin/master' by 18 commits.
(use "git push" to publish your local commits)
Changes to be committed:
(use "git reset HEAD ..." to unstage)

modified: pom.xml

Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)

modified: poms/cds/pom.xml
modified: poms/sso-core/pom.xml
modified: poms/sso-filter/pom.xml
modified: poms/sso-fp/pom.xml
modified: poms/webfilebrowser/pom.xml

Untracked files:
(use "git add ..." to include in what will be committed)

pom.xml.releaseBackup
poms/cds/pom.xml.releaseBackup
poms/sso-core/pom.xml.releaseBackup
poms/sso-filter/pom.xml.releaseBackup
poms/sso-fp/pom.xml.releaseBackup
poms/webfilebrowser/pom.xml.releaseBackup
release.properties

C:\eclipse-workspace\webfilebrowser>git hist -10
git hist -10
* 52e8510 2016-03-07 11:27:18 +0100 | Request a newer maven release plugin to fix git troubles. (HEAD -> master, tag: wfb-1.2.3) [lemkemch]
...
```

---

**Affects:** 2.5.3

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing mvn release:prepare with the listed multi-module pom.xml files on Git under Cygwin, then inspect how the Git add and status commands construct paths. Done means all modified POMs are handled correctly, the release completes without leaving releaseBackup files or release.properties, and the resulting commit state matches the expected release.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.