I have a maven project which is stored in our GIT repository. When I make a release of this project with mvn release:prepare
and mvn release:perform
sometimes it fails in the later step but a tag is created for this release anyway. This tag doesn't get removed with mvn release:rollback
, and if I try to prepare the release again it fails with this tag-already-exists error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.2:prepare (default-cli) on project lwl-module: Unable to tag SCM
[ERROR] Provider message:
[ERROR] The git-tag command failed.
[ERROR] Command output:
[ERROR] fatal: tag 'lwl-module-1.5.1' already exists
[ERROR] -> [Help 1]
[ERROR]
Is there a way to get mvn release:rollback
to delete the last tag in our GIT repository?
I'm using this release plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.2</version>
</plugin>