eclipse加载maven工程提示pom.xml无法解析org.apache.maven.plugins:maven-resources-plugin:2.4.3解决方案


pom文件提示信息:

Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 from http://repo1.maven.org/maven2
was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed
or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-resources-
plugin:pom:2.4.3 from/to central (http://repo1.maven.org/maven2): No response received after 60000

 

原因和解决方案:

因为本地maven仓库缺少maven-resources-plugin-2.4.3.jar和相关jar文件。打开\.m2\repository\org\apache\maven\plugins\maven-resources-plugin\2.4.3目录,如果没有jar包,则需要在pom中添加:

<dependency>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-resources-plugin</artifactId>
    <version>2.4.3</version>
</dependency>

然后执行 mvn install,会自动下载相关jar包,出现BUILD SUCCESS之后,项目右键 update dependencies,然后发现恢复正常。

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM