2013-03-28 42 views
2

所以我試圖按照Gerrit文檔(版本2.5.2)中說明如何設置gerrit插件項目(文檔here)中的文檔說明。初始化gerrit插件項目時出錯

我從演示文稿here開始工作正常,直到「步驟3」幻燈片有一個類似的mvn命令與上面鏈接的gerrit文檔中的內容相同。

該項目創建步驟失敗,此錯誤:

[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 

所以我有點現在失去。我不知道如何解決它。

特別是因爲我遵循Gerrit記錄的命令來設置項目。我會認爲這將有正確的原型信息。但顯然它沒有。

回答

2

Gerrit似乎沒有提供他們的公共回購原型。 它看起來像你將不得不從源頭建立和安裝原型。

這被示出在「步驟2」滑動

0

你必須克隆格里特源代碼,然後:

cd gerrit/gerrit-plugin-archetype && mvn install 

其他的方法是使用其在文檔中提到的模板:

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