Our current pom file uses the keyword RELEASE for many of our dependencies, and we need to keep an artifact pom which contains the actual version that release corresponds to. Prepare-with-pom does this, and if I run maven with -DdryRun, I get a release-pom.xml that looks exactly correct.
However, for the real deal I need to remove the dry run and add the perform command. At this point maven does something weird. It fails every time with the following message:
The git-add command failed.
Command output:
fatal: pathspec 'release-pom.xml' did not match any files
A quick look through the most recent commands run shows:
[INFO] Executing: /bin/sh -c cd /Users/mikeburke/experience-manager/exm-v2 && git rm release-pom.xml
[INFO] Working directory: /Users/mikeburke/experience-manager/exm-v2
[INFO] Checking in modified POMs...
[INFO] Executing: /bin/sh -c cd /Users/mikeburke/experience-manager/exm-v2 && git add -- pom.xml release-pom.xml
Of course release-pom.xml isn't there, you just removed it.
So, why does this happen, and more importantly, how do I fix it? I've looked all through the forums and beyond, and the closest I've found to my problem is this, which recommends using various conflicting versions of maven and its dependencies, all of which I have tried. Has any one run this successfully, and can you help me please?