使用eclipse maven遇到的错误(转)

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project example:
Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed:
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved:
Failed to collect dependencies for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 ():
Failed to read artifact descriptor for org.apache.maven:maven-plugin-descriptor:jar:2.0.6:
Could not transfer artifact org.apache.maven:maven-plugin-descriptor:pom:2.0.6 from/to central (repo.maven.apache.org/maven2):
No response received after 60000 -> [Help 1]

解决办法:

在.m2\ 目录下新建settings.xml 文件,编辑内容如下:

<settings>
    <mirrors>
        <mirror>
            <id>uk.maven.org</id>
            <mirrorOf>central</mirrorOf>
            <name>UK Central</name>
            <url>http://uk.maven.org/maven2</url>
        </mirror>
    </mirrors>
</settings>

然后删除repository目录,重新执行mvn install

posted @ 2013-11-14 23:35  sandea  阅读(739)  评论(0编辑  收藏  举报