2012-01-09 63 views
0

我有一個基於Maven的項目,我試圖將其導入到Spring源工具套件。我收到以下錯誤。Spring和Maven插件安裝問題; MVN;春天

Description Resource Path Location Type 
Could not calculate build plan: Missing: 
---------- 
1) org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.4.2 

    Try downloading the file manually from the project website. 

    Then, install it using the command: 
     mvn install:install-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-resources-plugin -Dversion=2.4.2 -Dpackaging=maven-plugin -Dfile=/path/to/file 

    Alternatively, if you host your own repository you can deploy the file there: 
     mvn deploy:deploy-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-resources-plugin -Dversion=2.4.2 -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] 

---------- 
1 required artifact is missing. 

for artifact: 
    org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.4.2 

from the specified remote repositories: 
    central (http://repo1.maven.org/maven2, releases=true, snapshots=false) 
    Gamex  Unknown Maven Problem 

它看起來像它要求我安裝Maven的資源插件2.4.2,但我不知道什麼是要下載的文件。我嘗試下載maven-plugin-plugin-2.4.2-source.jar並將其提供給命令;但它不起作用。 然後我去了http://svn.apache.org/viewvc/maven/plugins/tags/maven-resources-plugin-2.4.2/的Maven倉庫並下載了pof.xml;這也不起作用。 如果你在看到這個問題之前,請幫助我瞭解什麼是缺失/或錯誤信息是什麼。

謝謝,

+0

也許http://stackoverflow.com/questions/5074063/maven-problem-failure-to-transfer導致錯誤 – Raghuram 2012-01-10 12:47:43

回答

1

您可能在防火牆後面。您可以嘗試設置HTTP代理繞過防火牆。

在Windows中,這個文件位於:C:\Documents and Settings\<windows Login>\.m2\settings.xml

您需要提供基於網絡是如何在您的組織設置到<proxy>有效參數。

<settings 
... 
    <proxies> 

    <proxy> 
     <active>true</active> 
     <protocol>http</protocol> 
     <host>put-ur-proxy-servername</host> 
     <port>80</port> 
    </proxy> 
... 
</settings>