Maven发布插件在创建标签时失败 [英] Maven release plugin fails when creating tag

查看:103
本文介绍了Maven发布插件在创建标签时失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

我被困在release:prepare上,得到了这个神秘的错误:

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] ------------------------------------------------------------------------

  • 标记文件夹确实存在并且为空
  • 我执行了命令mvn clean release:clean release:prepare以确保重新运行
  • 每次遇到错误时,我都会执行mvn release:rollback使一切恢复正常
  • 这似乎不是一个凭证问题,有效的提交了pom文件,同时删除了-SNAPSHOT并将scm信息切换到了标记文件夹.
    • 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.
    • 奇怪的是我不知道如何提交pom文件,因为我既未在pom中也未在maven本地安装中的settings.xml文件中指定任何凭据

      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

      我看到许多人也遇到类似的问题,但出现了folder already exist错误消息.我没有告诉我错误的确切原因.

      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.

      你有什么想法吗?

      非常感谢.

      编辑: @科林 例如,如果我使用乌龟svn浏览svn://myserver/myproject/sandbox/release-test,则效果很好.但是,如果我在Firefox中输入 http://myserver/myproject/sandbox/release-test 找不到页面. 我也认为应该没问题,因为pom文件在尝试创建标签之前已提交. 我在pom文件中的scm部分:

      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>
      

      我尝试删除"http:",但这没用.

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

      推荐答案

      问题在这里并不是真正的问题.它更多是关于svn本身.当svn发送此错误消息时,Maven停止运行:

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

      svn:" http://myserver/myproject/sandbox/release-test ':200正常( http://myserver )

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

      您绝对确定http://myserver/myproject/sandbox/release-test地址吗?

      如果http://myserver/myproject/sandbox/release-test不存在,则svn不会提交任何内容.只需将 http://替换为 svn://

      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>
      

      链接:
      svnforum.org
      出现SVN错误(确定为200)从我的在线仓库中签出
      Tortoise svn Subversion更新错误

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

      这篇关于Maven发布插件在创建标签时失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆