I have a multi-module project that uses a git repo. When I do a
release:perform I get the following error from git:

[INFO] Executing: cmd.exe /X /C "git add -- pom.xml
D:\Dev\maven-git-testcase\child\pom.xml"
[INFO] Working directory: d:\dev\maven-git-testcase
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Unable to commit files
Provider message:
The git-add command failed.
Command output:
fatal: 'D:\Dev\maven-git-testcase\child\pom.xml' is outside repository

The error occurs because on Windows git doesn't like the absolute path to
the child pom that the maven release plugin creates. The git add command
would work if the path were D:/Dev/maven-git-testcase/child/pom.xml.

Reproducing this problem takes about 1 minute with a test project that
someone previously setup at
https://github.com/rickyclarkson/maven-git-testcase

1. Clone the project.
2. Change the maven release plugin version to 2.2 (newest).
3. Run maven release:clean release:perform.

Does anyone know how to resolve this?

Thanks,
Josh

Reply via email to