Search code examples
svnmaven-2releasemaven-scm

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.


Solution

  • 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.