使用maven创建简单的项目时候经常会遇到
Could not calculate build plan:
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
等类似的问题。
出现这个问题的原因,是因为插件出了一点问题删除后重新加载似乎就可以,但是实际上却无法根本解决问题,后来进过网上的资料查询后,得到结果:
在maven的settings.xml文件中加入
<mirror>
<id>Central</id>
<url>http://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
则问题得到了解决。