2012-01-12 48 views
1

當我執行:行家:所需的目標沒有找到

mvn -Dplugin=dependency help:describe 

衆多目標中,我得到:

... 
dependency:get 
    Description: Downloads a single artifact transitively from the specified 
    remote repositories. Caveat: will always check the central repository 
    defined in the super pom. You could use a mirror entry in your settings.xml 
...  
dependency:help 
    Description: Display help information on maven-dependency-plugin. 
    Call 
     mvn dependency:help -Ddetail=true -Dgoal=<goal-name> 
    to display parameter details. 
... 

但如果我執行 「MVN依賴性:幫助」 或 「MVN依賴性:得到」我得到:

[INFO] Searching repository for plugin with prefix: 'dependency'. 
[INFO] ------------------------------------------------------------------------ 
[ERROR] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Required goal not found: dependency:help in org.apache.maven.plugins:maven-dependency-plugin:2.0 

這是正常的嗎?這不僅發生在依賴插件上,也發生在其他人身上。 我的Maven的版本是:

Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) 
Java version: 1.6.0_30 
Java home: c:\xxxx\jdk1.6.0_30\jre 
Default locale: de_DE, platform encoding: Cp1252 
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows" 

回答

1

難道這是與依賴的版本問題:獲取正在每種情況下使用?如果help:describe向您顯示了有關Version:2.4的信息,但依賴關係:get正在org.apache.maven.plugins:maven-dependency-plugin:2.0中尋找目標,那麼這將匹配我所看到的行爲我的當地環境之一。

mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get 

可能會提供額外的線索。

相關問題