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:
Maven有一个名为maven-scm-plugin的插件,可以与源代码控制系统进行交互。根据文档,我应该能够导出这样的项目:
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:
但是,当我使用maven 2.0.9运行此命令时,我从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!
因此,该插件的beta-3版本似乎没有“导出”目标,但它在1.1中添加。我在我的maven repo中有两个版本(.m2 \ repository \ org \ apache \ maven \ plugins \ maven-scm-plugin),但maven坚持使用旧的beta版本,并且当它找不到时出错“出口”目标。如何强制maven使用scm插件的1.1版本? mvn scm:export命令是独立使用的,因此没有要配置的POM文件。谢谢!
1 个解决方案
#1
0
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.
自己找到解决方案..在插件目录(.m2 \ repository \ org \ apache \ maven \ plugins \ maven-scm-plugin)中,有一个名为maven-metadata-central.xml的文件。我曾经将“1.0-beta-3”作为“最新”和“发布”元素的值,这就是为什么maven坚持使用这个旧版本。在我将它们更改为1.1后,我能够运行该命令。
#1
0
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.
自己找到解决方案..在插件目录(.m2 \ repository \ org \ apache \ maven \ plugins \ maven-scm-plugin)中,有一个名为maven-metadata-central.xml的文件。我曾经将“1.0-beta-3”作为“最新”和“发布”元素的值,这就是为什么maven坚持使用这个旧版本。在我将它们更改为1.1后,我能够运行该命令。