我的 maven 和 svn 设置有问题。我最近一直在玩 git,现在我看到了 SVN 的问题。我有一种安装强制 SVN 更新的感觉,但从我安装的软件的外观来看,情况并非如此。
我正在使用 cygwin,但是当我通过命令提示符尝试此操作时也会出现问题。
我在我的机器上的设置是:
- svn,版本 1.7.14 (r1542130)
- Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 13:51:28+0000)
- SlikSvn 1.7.17
- Cygwin 1.7.29(0.272/5/3)
我可以使用 Tortoise SVN(版本 1.7.14)提交到 SVN 并从中更新,但是每当我尝试使用 release:prepare 和 release:perform 命令发布我的应用程序时,我都会遇到以下故障。问题是结帐路径正在连接到自身。
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD SUCCESS
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 23.693s
[INFO] [INFO] Finished at: Tue May 20 14:19:59 BST 2014
[INFO] [INFO] Final Memory: 17M/138M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive commit --file C:\cygwin\tmp\maven-scm-1575361850.commit --targets C:\cygwin\tmp\maven-scm-6249519314346478050-targets"
[INFO] Working directory: C:\Users\danielt\Workspace\Common\Adapters\Zuul\trunk
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35.022s
[INFO] Finished at: Tue May 20 14:19:59 BST 2014
[INFO] Final Memory: 13M/100M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project zuul-api: Unable to commit files
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: E155010: Commit failed (details follow):
[ERROR] svn: E155010: The node '/cygdrive/c/Users/danielt/Workspace/Common/Adapters/Zuul/trunk/C:/Users/danielt/Workspace/Common/Adapters/Zuul' was not found.
[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 release:prepare -Dtag=1.8.30 -DreleaseVersion=1.8.30 -DdevelopmentVersion=1.8.31-SNAPSHOT -Dresume=false -DautoVersionSubmodules=true release:perform
真正奇怪的是,maven 很乐意检查本地修改,如下所示。
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Zuul Api 1.8.30-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.0:prepare (default-cli) @ zuul-api ---
[INFO] Verifying that there are no local modifications...
[INFO] Executing: cmd.exe /X /C "svn --non-interactive status"
[INFO] Working directory: C:\Users\danielt\Workspace\Common\Adapters\Zuul\trunk
如果有人知道 svn、maven 和/或 cywgin 之间的任何版本不兼容,我会很高兴听到它们并试用它们,看看它们是否能解决我的问题。
最佳答案
感谢上帝this maven issue我今天早上在尝试解决这个问题时发现。
Samuel Kerrien 于 2007 年 3 月 31 日发表的评论将我指向了我的 PATH 变量。
I have had the same problem and making sure that Windows' subversion was upstream of cygwin in the PATH did the trick. Hope that helps
基本上,这归结为 PATH 变量和组件顺序的问题。
我有:
...
C:\cygwin\bin;
...
C:\Program Files\SlikSvn\bin;
...
但是 SVN 的 windows 版本需要首先让 mvn 获取正确的文件路径,而不是来自 cygwin 的相关文件路径。所以将其更改为:
...
C:\Program Files\SlikSvn\bin;
...
C:\cygwin\bin;
...
关于java - Maven 发布插件无法提交 - E155010 节点路径有两次路径 - Cygwin 和 DOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23761791/