java 创建标签时Maven发布插件失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3560461/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Maven release plugin fails when creating tag
提问by IceGras
I'm trying to use Maven release plugin 2.0 to tag the version and hopefully deploy the resulting jar to the repository.
我正在尝试使用 Maven 发布插件 2.0 来标记版本,并希望将生成的 jar 部署到存储库。
I got stuck at release:prepare, getting this cryptic error:
我被困在release:prepare,得到这个神秘的错误:
[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:prepareto be sure have a fresh run - Every time I got the error I executed
mvn release:rollbackto have everything back to normal - It doesn't seem to be a credentials problem, the pom file is effectively commited with the
-SNAPSHOTremoved and the scm information switched to the tag folder.
- 标签文件夹确实存在并且为空
- 我执行了命令
mvn clean release:clean release:prepare以确保重新运行 - 每次我收到错误时,我都会执行
mvn release:rollback以使一切恢复正常 - 这似乎不是凭据问题,pom 文件被有效地提交并
-SNAPSHOT删除,scm 信息切换到标签文件夹。
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
奇怪的部分是我不明白 pom 文件是如何提交的,因为我既没有在 pom 中也没有在位于 maven 本地安装的 settings.xml 文件中指定任何凭据
I saw many people having a similar issue but with the folder already existerror message. Mine doesn't tell me what the error is precisely.
我看到很多人有类似的问题,但有folder already exist错误消息。我的没有告诉我错误是什么。
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-testin 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 :
编辑:@Colin 如果我使用 tortoise svn 浏览 svn://myserver/myproject/sandbox/release-test 例如它工作正常。但是,如果我在 Firefox 中键入http://myserver/myproject/sandbox/release-test,则找不到该页面。另外我认为应该没问题,因为在尝试创建标签之前提交了 pom 文件。我在 pom 文件中的 scm 部分:
<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.
我尝试删除“http:”,但这没有用。
采纳答案by Colin Hebert
The problem isn't really maven here. It's more about svn itself. Maven stops its operation when svn send this error message :
问题不是真正的专家在这里。更多的是关于 svn 本身。当 svn 发送此错误消息时,Maven 停止其操作:
svn: OPTIONS of 'http://myserver/myproject/sandbox/release-test': 200 OK (http://myserver)
svn:' http://myserver/myproject/sandbox/release-test'的选项:200 OK(http://myserver)
Are you absolutly sure about the http://myserver/myproject/sandbox/release-testadress ?
你绝对确定http://myserver/myproject/sandbox/release-test地址吗?
If http://myserver/myproject/sandbox/release-testdoesn't exists svn won't commit anything. Just replace the http://by svn://
如果http://myserver/myproject/sandbox/release-test不存在 svn 将不会提交任何内容。只需更换的http://通过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
链接:
svnforum.org
从我的在线存储库中检出时出现 SVN 错误 (200 OK)
Tortoise svn Subversion Update Error

