2010-06-09 46 views
3

命令:這個Maven插件真的有一個無效的描述符嗎?

mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate -DarchetypeGroupId=org.beardedgeeks -DarchetypeArtifactId 
=gae-eclipse-maven-archetype -DarchetypeVersion=1.1.2 -DarchetypeRepository=http://beardedgeeks.googlecode.com/svn/repository/release 
s 

OUTPUT:

[INFO] Scanning for projects... 
[INFO] ------------------------------------------------------------------------ 
[ERROR] BUILD ERROR 
[INFO] ------------------------------------------------------------------------ 
[INFO] Internal error in the plugin manager getting plugin 'org.apache.maven.plugins:maven-archetype-plugin': Plugin 'org.apache.maven 
.plugins:maven-archetype-plugin:2.0-alpha-4' has an invalid descriptor: 
1) Plugin's descriptor contains the wrong group ID: net.kindleit 
2) Plugin's descriptor contains the wrong artifact ID: maven-gae-plugin 
3) Plugin's descriptor contains the wrong version: 0.5.9 
[INFO] ------------------------------------------------------------------------ 
[INFO] For more information, run Maven with the -e switch 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: < 1 second 
[INFO] Finished at: Wed Jun 09 20:48:35 CEST 2010 
[INFO] Final Memory: 3M/15M 
[INFO] ------------------------------------------------------------------------ 

我很難相信這個Maven插件具有無效的描述,因爲其他人似乎可以用它沒有問題。難道我做錯了什麼?

回答

1

無法重現您的問題,下面的命令工作正常,我(複製&從GAE + Eclipse + Maven Archetype粘貼):

mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate \ 
    -DarchetypeGroupId=org.beardedgeeks \ 
    -DarchetypeArtifactId=gae-eclipse-maven-archetype \ 
    -DarchetypeVersion=1.1.2 \ 
    -DarchetypeRepository=http://beardedgeeks.googlecode.com/svn/repository/releases 

測試與Maven 2.2.1:

$ mvn -version 
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) 
Java version: 1.6.0_20 
Java home: /usr/lib/jvm/java-6-sun-1.6.0.20/jre 
Default locale: en_US, platform encoding: UTF-8 
OS name: "linux" version: "2.6.32-22-generic" arch: "i386" Family: "unix" 
+0

謝謝!接下來我將嘗試Linux。 – ovr 2010-06-10 21:54:03

2

我經常遇到在本地存儲庫中存在蹩腳的元數據問題。這種錯誤通常消失我做

rm -Rf my/home/dir/.m2/repository/net/kendleit/maven-gae-plugin 

,但實際上,爲什麼它的工作原理與帕斯卡爾的原因,而您使用此URL http://beardedgeeks.googlecode.com/svn/repository/release帕斯卡使用此URL http://beardedgeeks.googlecode.com/svn/repository/releases後(一個s丟失,因​​此有一個404)

做RM如上所述,然後用正確的URL再次運行


編輯:對不起,其實尾隨的I沒看見有。我把所有東西都回來了,但仍然是:嘗試刪除本地存儲庫中的元數據

+0

+1錯誤的元數據很可能是問題的根源(儘管我面對不好的元數據已經有一段時間了)。 – 2010-06-10 21:55:23

+0

那麼你的聯繫可能比我被迫使用的那個更好:-) – 2010-06-10 21:58:10

0

原因: Nexus(因此在本地存儲庫和pom.xml中)中的GAV(groupid,artifactid,version)不是同爲一個在\ META-INF的jar文件\行家\ plugin.xml的

這通常發生在你手動上傳在自己的Nexus插件神器(或任何其他的Maven企業知識庫)

解決方案發生:

  • 下載jar,s ee值是什麼plugin.xml中
  • 的GAV值上傳在Nexus罐子,路過的GAV從plugin.xml的
  • 更新pom.xml中的信息相應

確保獲得Nexus刪除舊的不一致的神器。

相關問題