为什么我得到PluginResolutionException?

时间:2011-08-09 08:39:30

标签: java java-ee maven

我正在使用默认情况下具有maven 3.0.3的NetBeans 7.0 ....上周我打开了一个使用Maven 2.2开发的项目...现在甚至在关闭该项目之后...... NetBeans不允许我创建任何新项目......甚至不是NetBeans的示例项目....每次我收到以下错误......

    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 个答案:

答案 0 :(得分:1)

  

未知主机repo1.maven.org

尝试将您的DNS设置为8.8.8.88.8.4.4这些是谷歌的DNS,可以解析此名称

在Linux机器上。

sudo gedit /etc/resolv.conf

使用提到的IP

添加名称服务器的条目