I am trying to execute mvn release:perform
, but the command assumes that the pom file is at the root of the repository. Is there a system property or preference that I can set to override the default?
The call to mvn release:prepare
seems to have succeeded as all the release artifacts are sitting in the target directory and the repository is properly tagged.
In case it matters, this is a git project.
EDIT Here is what I did:
cd /path/to/git/root/path/to/mvn/project
mvn -DdevelopmentVersion=1.2.0-SNAPSHOT -DreleaseVersion=1.1.0 release:prepare
...enter correct passphrase and choose all default options...
mvn release:perform
And then cloning the remote repo in the target/checkout
directory and after some churning and pushing to the remote git repo, the following error happens:
[ERROR]
[ERROR] The project (/path/to/git/root/path/to/mvn/project/target/checkout/pom.xml) has 1 error
[ERROR] Non-readable POM /path/to/git/root/path/to/mvn/project/target/checkout/pom.xml: /path/to/git/root/path/to/mvn/project/target/checkout/pom.xml (No such file or directory)
So, maven is looking for the pom file in the root of the target/checkout
directory, which is not where it is located.