2011-08-09 157 views
1

我正在使用默認的maven 3.0.3的NetBeans 7.0 ....上週我打開了一個使用Maven 2.2開發的項目...現在即使在關閉該項目後,NetBeans也不允許我創建任何新的項目......甚至在NetBeans項目示例....每次我碰到下面的錯誤...爲什麼我得到PluginResolutionException?

Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 from/to central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org: Unknown host repo1.maven.org -> [Help 1] 

    To see the full stack trace of the errors, re-run Maven with the -e switch. 
    Re-run Maven using the -X switch to enable full debug logging. 

    For more information about the errors and possible solutions, please read the following articles: 
    "**[Help 1] http://cw 

iki.apache.org/confluence/display/MAVEN/PluginResolutionException"** 

這方面的任何幫助將不勝感激....

謝謝提前,,

回答

1

未知主機repo1.maven.org

嘗試的DNS設置爲8.8.8.88.8.4.4這些都是谷歌的DNS可以將此名稱解析

在Linux機器

sudo gedit /etc/resolv.conf 

添加域名服務器的條目所提到的IP

+0

感謝@Jigar着,但我如何更改DNS名稱...?在主要的系統設置或在NetBeans(不幸的是我無法找到Netbeans IDE中的任何這樣的字段)... – aProgrammer

+1

檢查更新

+0

謝謝....那工作...我試圖解決這個錯誤的相當幾個小時......你節省了一些時間......再次感謝..... – aProgrammer