Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does mvn release:prepare fail while tagging?

With my multiproject pom I get an error while running release:prepare. There is nothing fancy about the project setup and every release-step before runs fine. The error I get is:

    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Unable to tag SCM
    Provider message:
    The svn tag command failed.
    Command output:
    svn: Commit failed (details follow):
    svn: File '/repos/june/tags/foo-1.0.2/foo.bar.org/pom.xml' already exists

Any idea where it comes from and how to get around it?

(sorry for duplicate post - first was closed because I didn't formulate it as a question that can be answered. I hope it's ok now.)

EDIT
The maven release plugin takes care of the version handling itself. So when I check the path in the subversion repository the path does not yet exist.

EDIT 2
@Ben: I don't know the server version, however the client is 1.5.2, too.

like image 842
Roland Schneider Avatar asked Sep 18 '08 12:09

Roland Schneider


People also ask

What does Mvn release do?

mvn release will basically put your current code in a tag on your SCM, change your version in your projects. mvn deploy will put your packaged maven project into a remote repository for sharing with other developers.


2 Answers

This issue is addressed in the latest version of the maven-release-plugin. Add this to your POM to pull it in.

<build>
  <pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.0-beta-9</version>
      </plugin>
    </plugins>
  </pluginManagement>
</build>

The issue that was fixed is MRELEASE-375.

like image 63
Dominic Mitchell Avatar answered Oct 04 '22 03:10

Dominic Mitchell


It's because you haven't increased the version number - 1.0.2 already exists in your Subversion repo.

Either increment your version or just remove the /repos/june/tags/foo-1.0.2 tag from your repo.

like image 45
PEELY Avatar answered Oct 04 '22 01:10

PEELY