maven-compiler-plugin:3.5.2 or one of its dependencies could not be resolved: Failure to find org.ap

小咪咪 2022-06-01 09:41 252阅读 0赞

1. 背景

  1. 为了解决Eclipse JRE System Library \[J2SE-1.5\]问题(改build path Jre版本后, 再打开eclipse 又变为1.5了), pom.xml加了
  2. </plugins><plugin>
  3. <groupId>org.apache.maven.plugins</groupId>
  4. <artifactId>maven-compiler-plugin</artifactId>
  5. <version>3.5.2</version>
  6. <configuration>
  7. <source>1.8</source>
  8. <target>1.8</target>
  9. </configuration>
  10. </plugin> </plugins>

maven->update project 出下面错误:

The POM for org.apache.maven.plugins:maven-compiler-plugin:jar:3.5.2 is missing, no dependency information available

[ERROR] Plugin org.apache.maven.plugins:maven-compiler-plugin:3.5.2 or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-compiler-plugin:jar:3.5.2 in https://repo.maven.apache.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 -> [Help 1]

2. 解决办法

==================

2.1 删除XXX\.m2\repository\org\apache\maven\plugins\maven-resources-plugin\ 下文件夹
  1. xxx 可以查找 window->preferences->Maven->user settings
  2. 如果删不了,关闭eclipse (打开eclipse 时候 maven 更新)
2.2 右键项目 maven->update project

勾上 force update of snapshots/releases

会重新下载maven plugin .m2\repository\org\apache\maven\plugins\maven-resources-plugin\3.5.2

#

发表评论

表情:
评论列表 (有 0 条评论,252人围观)

还没有评论,来说两句吧...

相关阅读