5

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.

8 Answers 8

10

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.

1

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.

1

Roland, if you haven't seen this already, take a look at John Smart's blog post about this problem. Although the script he proposes is inelegant, it solves the problem:

http://weblogs.java.net/blog/johnsmart/archive/2008/12/subversion_mave.html

The other solution is to use Git. (Me == currently writing about Maven and Git)

1
  • Thanks for the additional info. I didn't know the blog entry yet. Feb 19, 2009 at 6:54
1

Potentially useful links:

http://weblogs.java.net/blog/johnsmart/archive/2008/12/subversion_mave.html (previously mentioned)

http://jira.codehaus.org/browse/MRELEASE-427 (the real bug?)

http://jira.codehaus.org/browse/SCM-406 (related bug)

http://olafsblog.sysbsb.de/?p=73 (newer and perhaps more helpful post)

0

As far as I know it is a bug in Subversion 1.5 and not directly related with maven. However a workaround the fixed it for me is to update the local svn repository and run the release:prepare goal again.

0

I spent quite a while fighting with this. Something is different in SVN 1.5.1+ that breaks committing to a tag straight from the working copy - which is exactly what Maven does. There's still a lot of finger-pointing as to who's responsible for fixing the problem.

You can do an 'svn update' and rerun the release command but if you're doing a release:branch, this will cause the release plugin not to return your POM files to their previous state.

The best workaround I know of is to drop back to Subversion 1.5.0.

0

This is fixed in the newest release plugin release, 2.0-beta-9

0

I hit this post as I was having a build issue on a server that did not have svn installed.

This helped: Jenkins with Subversion

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.