Maven发布插件创建标签时失败

发布于 2024-09-16 00:25:34 字数 2777 浏览 5 评论 0原文

我正在尝试使用 Maven 发布插件 2.0 来标记版本并希望将生成的 jar 部署到存储库。

我陷入了 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] ------------------------------------------------------------------------
  • 标签文件夹确实存在并且为空
  • 我执行了命令 mvn clean release:clean release:prepare 来确定重新运行
  • 每次收到错误时,我都会执行 mvn release:rollback 以使一切恢复正常
  • 这似乎不是凭据问题,pom 文件已使用 有效提交>-SNAPSHOT 被删除,scm信息切换到标签文件夹。

奇怪的是我不明白pom文件是如何提交的,因为我没有在pom中或maven本地安装中的settings.xml文件中指定任何凭据,

我看到很多人都有类似的问题,但是<代码>文件夹已存在错误消息。我的没有告诉我错误到底是什么。

你有什么想法吗?

非常感谢。

编辑: @科林 例如,如果我使用 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>

我尝试删除“http:”,但这不起作用。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

携君以终年 2024-09-23 00:25:34

问题并不在这里。更多的是关于 svn 本身。当 svn 发送此错误消息时,Maven 停止其操作:

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

您绝对确定 http://myserver/myproject/sandbox/发布测试 地址?

如果 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>

链接:
svnforum.org
出现 SVN 错误 (200 OK)从我的在线存储库中查看
Tortoise svn Subversion 更新错误

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文