这两个插件都以同样的方式失败,这是有道理的,因为发布插件调用scm:status以确保没有本地修改。
以下是运行mvn release:prepare
的正常(短)错误:
$ mvn -DworkingDirectory=/tmp/maven release:prepare release:perform
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building bar 2.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.5:prepare (default-cli) @ bar ---
[INFO] Verifying that there are no local modifications...
[INFO] ignoring changes on: **/pom.xml.backup, **/release.properties, **/pom.xml.branch, **/pom.xml.next, **/pom.xml.releaseBackup, **/pom.xml.tag
[INFO] Executing: /bin/sh -c cd /home/davisk/workspaces/foo/bar && scm status --username johndoe@us.ibm.com --password '*****'
[INFO] Working directory: /home/davisk/workspaces/foo/bar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.954 s
[INFO] Finished at: 2014-07-23T03:12:04-05:00
[INFO] Final Memory: 15M/481M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5:prepare (default-cli) on project bar: Unable to check for local modi
fications
[ERROR] Provider message:
[ERROR] Error code for Jazz SCM status command - 54
[ERROR] Command output:
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
运行mvn scm:status -X
,我可以获得完整的基础错误消息(已修剪):
[DEBUG] Consumed line :Workspace: (1023) "bar" (This workspace is unreachable.)
[DEBUG] Consumed line : Could not determine the URI required to connect to the repository. The UUID of
[DEBUG] Consumed line : the repository is _t2J8kWECEeKBH6O9T2VOlA. If you know the repository URI run
[DEBUG] Consumed line : 'login' command providing the repository URI. If not, please contact your
[DEBUG] Consumed line : administrator.
需要解决此问题。
答案 0 :(得分:1)
从某些研究来看,听起来Maven的RTC / Jazz SCM提供程序可能是针对RTC 3.0命令行界面构建的。
幸运的是,似乎有一个完全可用的解决方法:提前通过RTC的scm login
命令行工具登录:
$ scm login --repository-uri https://fizz.example.com:9443/ccm --username johndoe@us.ibm.com
Password (johndoe@us.ibm.com @ https://fizz.example.com:9443/ccm):
Logged in to https://fizz.example.com:9443/ccm
运行一次后,似乎登录缓存在某处,然后mvn scm:status
调用按预期工作。