2014-02-28 208 views
1

我能夠從命令行創建maven項目,但無法從eclipse創建項目。我在eclipse中配置了與外部相同的maven。當我嘗試創建Maven項目時,它給我下面的錯誤。如何解決以下錯誤。Maven項目的創建 - 雖然從Eclipse創建項目失敗

我的Eclipse版本是開普勒

Could not calculate build plan: Plugin org.apache.maven.plugins:maven- resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources- 
    plugin:jar:2.5 
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 

請指教。

+0

你背後的代理,表示爲W掃?您可以嘗試刪除'.m2/repository/org/apache/maven/plugins/maven-resources-plugin/2.5'中的所有內容或Maven倉庫所在的任何位置。 – davidfmatheson

+0

從.m2位置刪除jar文件後,再次得到相同的錯誤。 – user2848031

+0

只是jar文件?我會嘗試刪除一切。 – davidfmatheson

回答

1

試試這個:

1:刪除.M2內容 2:settings.xml中

<proxies> 
<proxy> 
    <active>true</active> 
    <protocol>http</protocol> 
    <host>proxy.com</host> 
    <port>xxxx</port> 
    <nonProxyHosts>local.net</nonProxyHosts> 
</proxy> 
</proxies> 

小心設置代理服務器配置!不要把任何的用戶名和passowrd如果代理是沒有權威性

3:關閉Eclipse..and重新

4:清潔和更新項目配置

5:驗證用於java的球泡路徑項目配置

6:嘗試使用Maven嵌入到Eclipse只是一個測試,看看問題是否是外部Maven安裝損壞