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,然后发现恢复正常。
时间: 2024-10-13 11:51:19