Why does mvn release:prepare fail while tagging?
Asked Answered
P

8

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.

Profitsharing answered 18/9, 2008 at 12:55 Comment(0)
C
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.

Cannula answered 15/4, 2009 at 10:22 Comment(0)
P
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.

Peloquin answered 18/9, 2008 at 13:4 Comment(0)
C
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)

Corinnacorinne answered 3/2, 2009 at 22:54 Comment(1)
Thanks for the additional info. I didn't know the blog entry yet.Profitsharing
V
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)

Vernation answered 14/4, 2009 at 16:54 Comment(0)
P
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.

Profitsharing answered 18/9, 2008 at 13:3 Comment(0)
P
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.

Phraseogram answered 30/10, 2008 at 14:12 Comment(0)
Y
0

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

Yukikoyukio answered 19/4, 2009 at 2:7 Comment(0)
A
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

Afterward answered 15/10, 2013 at 11:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.