Hudson Maven 发布 Subversion

发布于 2025-01-03 05:45:57 字数 536 浏览 3 评论 0原文

我现在尝试了近 2 天来让发布插件与 maven 和 hudson 一起运行。我现在安装了一个 svn 客户端(不知道为什么我需要这个,因为 Hudson 有一个 SVN 插件)并且该插件能够运行“mvn”命令。现在重新启动 hudson 和工作后,我收到以下错误:

org.apache.maven.lifecycle.LifecycleExecutionException:无法在项目框架上执行目标org.apache.maven.plugins:maven-release-plugin:2.0:prepare(default-cli):无法检查本地修改 提供者消息: svn 命令失败。 命令输出: svn:E155036:请参阅“svn升级”命令 svn: E155036: 工作副本 'C:.hudson\jobs\Project 1\workspace' 太旧(格式 8,由 Subversion 1.4 创建)

我在这里做错了什么?看来我使用这个插件是严重错误的,因为我正在从一个错误步入另一个错误。

感谢您的帮助!

I am trying now for almost 2 days to get the release plugin running with maven and hudson. I installed now a svn client(dont know why I needed to this as Hudson has a SVN plugin) and the plugin is able to run "mvn" commands. Now after restarting hudson and the job I am getting the following error:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project framework: Unable to check for local modifications
Provider message:
The svn command failed.
Command output:
svn: E155036: Please see the 'svn upgrade' command
svn: E155036: Working copy 'C:.hudson\jobs\Project 1\workspace' is too old (format 8, created by Subversion 1.4)

What I am doing wrong here? It looks like I am using this plugin heavily wrong as I am stepping from one error into another.

Thanks for your help!

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

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

发布评论

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

评论(3

那小子欠揍 2025-01-10 05:45:57

SVN 中的工作副本基于您使用的 svn 客户端版本。随着时间的推移,这些可能会不兼容(这没关系,因为它们总是为您提供一个易于升级的系统,通常会自动发生),但是从 sVN v 1.4 到最新版本 (1.7) 不会给您带来通常的自动升级可爱感。事实上,使用 svn 1.4 完成原始结账可能是一个坏主意,因为那是古老的。

因此,您需要找出原始结帐的内容是什么。如果是插件,则转储它。我不认为当前版本的 Hudson 有这么旧的 svn 客户端,即使他们还没有升级到 1.7,至少也会是 1.6.x。

检查 Maven 插件以查看其年龄,以及 svn 插件(以及您的 hudson 安装)。

Working copies in SVN are based on the version of the svn client you use. Over time these can be incompatible (which is ok, as they always give you an easy-upgrade system, usually this occurs automatically), however going from sVN v 1.4 to the latest (1.7) will not give you the usual auto-upgrade loveliness. In fact, getting the original checkout done using svn 1.4 is probably a bad idea anyway as that is ancient.

So, you need to find out what is doing the original checkout. If its the plugin, then dump it. I don't think the current version of Hudson has such an old svn client, even if they haven't upgraded it to 1.7 yet, it'll be on 1.6.x at the very least.

Check the maven plugin to see how old that is, and the svn plugin (and your hudson install).

別甾虛僞 2025-01-10 05:45:57

刚刚处理了 Jenkins 中的 Maven 版本,我感受到你的痛苦。

其他人已经回答了您的问题:您需要确保使用相同工作副本的所有 SVN 客户端都是相同的版本。

但是要回答您为什么需要命令行 SVN 客户端的元问题,这是因为 maven-release-plugin 不仅仅从 SVN 中提取数据,它实际上还必须 committag 修订,Hudson 没有为此提供机制。此外,maven-release-plugin 不能依赖于 Hudson 提供的东西,因为 Maven 用于许多其他 Hudson 不可用的上下文(例如,从命令行)。

如果您的问题实际上是为什么 maven-release-plugin 不能使用纯 Java SVN 客户端而不是依赖命令行客户端,那么答案是这是因为许可问题(< a href="https://issues.apache.org/jira/browse/LEGAL-45" rel="nofollow">SVNKit 库不能在 ASF 许可证下分发)。但是,有一个名为 的实现您可以使用maven-scm-provider-svnjava。我自己还没试过,所以YMMV。

Having just dealt with Maven releases in Jenkins, I feel your pain.

Others have already answered your question: you'll need to make sure all your SVN clients working with the same working copy are the same version.

But to answer your meta-question of why you need a command-line SVN client, it's because the maven-release-plugin doesn't just pull data down from SVN, it actually has to commit and tag revisions, and Hudson doesn't provide a mechanism for that. Additionally, maven-release-plugin can't depend on things that Hudson supplies, since Maven is used in many other contexts (e.g., from the command line) where Hudson isn't available.

If your question actually is why the maven-release-plugin can't use a pure Java SVN client instead of relying on a command line client, then the answer is that it's because of a licensing issue (the SVNKit library can't be distributed under the ASF license). However, there is an implementation called maven-scm-provider-svnjava that you can use. I haven't tried it myself, so YMMV.

微暖i 2025-01-10 05:45:57

您本地运行的 Subversion for Windows 客户端版本可能比您的 TortoiseSVN 版本更高...在 Sourceforge 中搜索“Subversion for Windows”以查找旧版本。

The version of the Subversion for Windows client you are running locally is likely a higher version that your TortoiseSVN... Search Sourceforge for "Subversion for Windows" to find older versions.

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