如何使用maven从subversion导出项目?

发布于 2024-07-08 16:17:57 字数 695 浏览 5 评论 0原文

Maven 有一个名为 maven-scm-plugin 的插件,它可以与源控制系统交互。 根据文档,我应该能够导出这样的项目:

mvn scm:export -DconnectionUrl=scm:svn:svn://url... -DexportDirectory=./project-export

但是,当我使用 maven 2.0.9 运行此命令时,我从 maven 收到以下错误:

[INFO] Required goal not found: scm:export in org.apache.maven.plugins:maven-scm-plugin:1.0-beta-3

所以看来 beta-3 版本的插件没有有“导出”目标,但它是在 1.1 中添加的。 我的 Maven 存储库 (.m2\repository\org\apache\maven\plugins\maven-scm-plugin) 中确实有两个版本,但是 Maven 坚持使用旧的测试版本,当找不到“出口”目标。 如何强制maven使用1.1版本的scm插件? mvn scm:export命令是独立使用的,因此不需要配置POM文件。 谢谢!

Maven has a plugin called maven-scm-plugin, which can interact with source control systems. According to the documentation, I should be able to export a project like this:

mvn scm:export -DconnectionUrl=scm:svn:svn://url... -DexportDirectory=./project-export

However when I run this command with maven 2.0.9, I got the following error from maven:

[INFO] Required goal not found: scm:export in org.apache.maven.plugins:maven-scm-plugin:1.0-beta-3

So it seems the beta-3 version of the plugin doesn't have the "export" goal, but it was added in 1.1. I do have both versions in my maven repo (.m2\repository\org\apache\maven\plugins\maven-scm-plugin), however maven insists on using the old beta version, and errors out when it can't find the "export" goal. How can I force maven to use the 1.1 version of the scm plugin? The mvn scm:export command is used independently, so there is no POM file to configure. Thanks!

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

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

发布评论

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

评论(1

战皆罪 2024-07-15 16:17:57

自己找到了解决方案。在插件目录(.m2\repository\org\apache\maven\plugins\maven-scm-plugin)中,有一个名为maven-metadata-central.xml的文件。 我曾经将“1.0-beta-3”作为“latest”和“release”元素的值,这就是maven坚持使用这个旧版本的原因。 将它们更改为 1.1 后,我可以运行该命令。

Found the solution myself.. In the plugin directory (.m2\repository\org\apache\maven\plugins\maven-scm-plugin), there is a file called maven-metadata-central.xml. I used to have "1.0-beta-3" as the value for both the "latest" and "release" elements, and that's why maven insists on using this old version. After I changed them to 1.1, I was able to run the command.

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