Maven release plugin fails when creating tag

有些话、适合烂在心里 提交于 2020-01-21 11:49:07

问题


I'm trying to use Maven release plugin 2.0 to tag the version and hopefully deploy the resulting jar to the repository.

I got stuck at release:prepare, getting this cryptic error:

[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive commit --file C:\Users\ME~1\AppData\Local\Temp\maven-scm-950614965.commit --targets C:\Users\ME~1\AppData\Local\Temp\maven-scm-35306-targets"
[INFO] Working directory: c:\workspace\release-test-trunk
[INFO] Tagging release with the label release-test-1.3.0...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive copy --file C:\Users\ME~1\AppData\Local\Temp\maven-scm-829250416.commit --revision 1885 http://myserver/myproject/sandbox/release-test/trunk http://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0"
[INFO] Working directory: c:\workspace\release-test-trunk
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Unable to tag SCM
Provider message:
The svn tag command failed.
Command output:
svn: OPTIONS of 'http://myserver/myproject/sandbox/release-test': 200 OK (http://myserver)

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20 seconds
[INFO] Finished at: Tue Aug 24 19:31:55 GMT 2010
[INFO] Final Memory: 14M/56M
[INFO] ------------------------------------------------------------------------
  • The tag folder does exist and is empty
  • I executed the command mvn clean release:clean release:prepare to be sure have a fresh run
  • Every time I got the error I executed mvn release:rollback to have everything back to normal
  • It doesn't seem to be a credentials problem, the pom file is effectively commited with the -SNAPSHOT removed and the scm information switched to the tag folder.

The strange part is I don't understand how the pom file is commited since I did not specify any credentials neither in the pom nor in the settings.xml file located in maven local install

I saw many people having a similar issue but with the folder already exist error message. Mine doesn't tell me what the error is precisely.

Do you have any ideas ?

Many thanks.

EDIT: @Colin If I browse svn://myserver/myproject/sandbox/release-test using tortoise svn for example it works fine. However if I type http://myserver/myproject/sandbox/release-test in Firefox the page is not found. Also I think it should be ok since the pom file gets commited before trying to create the tag. My scm section in the pom file :

<scm>
    <connection>scm:svn:http://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</connection>
    <developerConnection>scm:svn:http://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</developerConnection>
    <url>http://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</url>
</scm>

I tried removing the "http:" but that didn't work.


回答1:


The problem isn't really maven here. It's more about svn itself. Maven stops its operation when svn send this error message :

svn: OPTIONS of 'http://myserver/myproject/sandbox/release-test': 200 OK (http://myserver)

Are you absolutly sure about the http://myserver/myproject/sandbox/release-test adress ?

If http://myserver/myproject/sandbox/release-test doesn't exists svn won't commit anything. Just replace the http:// by svn://

<scm>
    <connection>scm:svn:svn://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</connection>
    <developerConnection>scm:svn:svn://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</developerConnection>
    <url>svn://myserver/myproject/sandbox/release-test/tags/release-test-1.3.0</url>
</scm>

Links :
svnforum.org
An SVN error (200 OK) when checking out from my online repo
Tortoise svn Subversion Update Error



来源:https://stackoverflow.com/questions/3560461/maven-release-plugin-fails-when-creating-tag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!