mardi, juin 21, 2011

Release issue...

We are facing this issue for months (years ?), and I still don't understand why...

One upon a time, we cut a release on one of my favorite projects (Apache MINA, Apache Directory Server, Apache LDAp API, Apache LDAp Studio), and we regularly get a message like :

#mvn release:prepare
...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.1:prepare (default-cli) on project project: Unable to tag SCM
[ERROR] Provider message:
[ERROR] The svn tag command failed.
[ERROR] Command output:
[ERROR] svn: No such revision 1138066

which is simply a nonsense. We have a workaround, it's a mater of running :
svn up
and replay the release command, which will succeed.

However, this is just an annoyance that I would like to see removed from our path.

Does anyone has a clue about what's going on ? I would be grateful (even if I just have an explanation like "it's a referenced bug in SVN").

6 commentaires:

Unknown a dit…

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

And: http://jira.codehaus.org/browse/MRELEASE-427

It is with Subversion clients 1.5.0 or higher.

Nicolas Lalevée a dit…

This is probably due to the european mirror of the Apache svn. Just after a commit on that server, a checkout or an update at the just committed revision is not available right away. There is some lag due to the synchronisation between the svn master in the US and the mirror in EU.
I faced the same issue while trying to use the mercurial/svn bridge on the apache svn server. The fix I did (and which should probably be done in maven too), was to do a regular check that the expected revision exists, every second during few seconds, then either actually fail or actually do the checkout/update.

Chris Custine a dit…

This is probably the known issue of using the EU apache SVN mirror. There is a bit of info about it here: http://www.apache.org/dev/version-control.html#https-svn-config

Seems the easiest way is to wait a few seconds and try the command again (after it has sync'd) but I also wonder if you could point the scm to the US server directly? HTH

Chris Custine a dit…

Following up on this for anyone searching, I also think using https://svn.us.apache.org for your scm url will work.

Emmanuel Lécharny a dit…

@Larry If it were an issue with SVN, wouldn't have such an issue more frequently, as I'm committing quite often (average, three times a day), no ?

@Nicolas, @Chris, sounds like a valuable explanation. The :
- svn ci tags on US server
- svn up from EU server
- commit something with the latest revision
sequence sounds like a good candidate for the kind of error I get.

Now, I have no idea why the release plugin uses the release number in the process. IMO, it has a perfect knowledge on what has been committed - or not- and should not do a svn up at all.

Or may be I'm just wrong...

Anyway, thanks all of you for your feedback, I feel less lonely :)

Norman Maurer a dit…

Its because of the eu mirror of svn. If you use the svn master you will see that you not get this at all.