[ https://jira.codehaus.org/browse/SCM-706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=364786#comment-364786 ]
Sergei Ivanov commented on SCM-706: ----------------------------------- SCM-772 seems to be completely unrelated to this issue. Here it looks more like {{maven-release-plugin}} has a bug in the sequence of the finishing operations of {{prepare-with-pom}} goal. I've just tried to release one of my projects, and the latest {{maven-release-plugin:2.5.1}} still failed miserably. The sequence of events is: # {{git ls-files}} # transform the {{pom.xml}} to the next snapshot version # {{git rm release-pom.xml}} # {{git add \-\- pom.xml release-pom.xml}} Note that {{prepare}} goal only executes {{git add \-\- pom.xml}}. At the moment the only workaround is to: # run {{mvn release:prepare-with-pom -DpushChanges=false}} (this is doomed to fail, but never mind, proceed to the next step) # run {{mvn release:prepare -DpushChanges=false}} (this will complete successfully and commit {{pom.xml}} changes) # manually amend the last commit with the deletion of {{release-pom.xml}} # push the changes into the remote repo manually # at this point it is safe to proceed with {{release:perform}} > prepare-with-pom deletes release-pom.xml then tries to git add it (presumably > so the next commit records the fact) > ------------------------------------------------------------------------------------------------------------------ > > Key: SCM-706 > URL: https://jira.codehaus.org/browse/SCM-706 > Project: Maven SCM > Issue Type: Bug > Components: maven-scm-provider-git > Affects Versions: 1.8.1 > Reporter: Darryl L. Miles > Assignee: Mark Struberg > Attachments: > 0001-MRELEASE-809-Use-git-correctly-when-removing-and-add.patch, pom.xml > > > When running: git release:prepare-with-pom > After the tag is created and pushed, it then runs the sequence: > git rm release-pom.xml > git add -- pom.xml release-pom.xml > But the "git add" fails because the "git rm" did the action of removing the > actual file and adding the file removal fact to the cached index ready for > the next commit to pickup. > The solution is to remove the "release-pom.xml" argument from the "git add" > it is unnecessary. -- This message was sent by Atlassian JIRA (v6.1.6#6162)