Maven 初始化gerrit插件项目时出错

Maven 初始化gerrit插件项目时出错,maven,plugins,gerrit,maven-archetype,Maven,Plugins,Gerrit,Maven Archetype,因此,我尝试按照Gerrit文档(版本2.5.2)中的文档说明来解释如何设置Gerrit插件项目(文档) 我从演示开始,一直到“步骤3”幻灯片,该幻灯片与上面链接的gerrit文档中的mvn命令类似 项目创建步骤失败,出现以下错误: [WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo1.maven.org/maven2). [WARNING] Use -Darc

因此,我尝试按照Gerrit文档(版本2.5.2)中的文档说明来解释如何设置Gerrit插件项目(文档)

我从演示开始,一直到“步骤3”幻灯片,该幻灯片与上面链接的gerrit文档中的mvn命令类似

项目创建步骤失败,出现以下错误:

[WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo1.maven.org/maven2).
[WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere.
Downloading: http://repo1.maven.org/maven2/com/google/gerrit/gerrit-plugin-archetype/2.5-SNAPSHOT/maven-metadata.xml
Downloading: http://repo1.maven.org/maven2/com/google/gerrit/gerrit-plugin-archetype/2.5-SNAPSHOT/gerrit-plugin-archetype-2.5-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.529s
[INFO] Finished at: Thu Mar 28 09:45:15 CDT 2013
[INFO] Final Memory: 11M/361M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.google.gerrit:gerrit-plugin-archetype:2.5-SNAPSHOT) -> [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
[警告]在任何目录中都找不到原型。退回到中央存储库(http://repo1.maven.org/maven2).
[警告]使用-DarchetypeRepository=如果archetype的存储库在别处。
下载:http://repo1.maven.org/maven2/com/google/gerrit/gerrit-plugin-archetype/2.5-SNAPSHOT/maven-metadata.xml
下载:http://repo1.maven.org/maven2/com/google/gerrit/gerrit-plugin-archetype/2.5-SNAPSHOT/gerrit-plugin-archetype-2.5-SNAPSHOT.jar
[信息]------------------------------------------------------------------------
[信息]生成失败
[信息]------------------------------------------------------------------------
[信息]总时间:1.529秒
[信息]完成时间:2013年3月28日星期四09:45:15
[信息]最终内存:11M/361M
[信息]------------------------------------------------------------------------
[错误]无法在独立项目pom上执行目标org.apache.maven.plugins:maven原型插件:2.2:generate(默认cli):所需原型不存在(com.google.gerrit:gerrit插件原型:2.5-SNAPSHOT)->[帮助1]
[错误]
[错误]要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。
[错误]使用-X开关重新运行Maven以启用完整调试日志记录。
[错误]
[错误]有关错误和可能的解决方案的更多信息,请阅读以下文章:
[错误][帮助1]http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
所以我现在有点迷路了。我不知道该怎么做才能把它修好


特别是因为我遵循Gerrit记录的命令来设置项目。我想这里面应该有正确的原型信息。但显然不是这样。

Gerrit似乎没有在公开回购中提供他们的原型。 看起来您必须首先从源代码构建和安装原型


这显示在“步骤2”幻灯片上,您必须克隆gerrit源代码,然后:

cd gerrit/gerrit-plugin-archetype && mvn install
另一种方法是使用文档中提到的模板:

 git clone https://gerrit.googlesource.com/plugins/cookbook-plugin