Cannot resolve plugin org.apache.maven.plugins:maven-compiler-plugin:3.8.1

目录

【问题描述】maven环境报错

Cannot resolve plugin

org.apache.maven.plugins:maven-compiler-plugin:3.8.1

【解决办法】

  1. 检查maven路径是否一致

  2. 路径一致的话,更改配置文件settings.xml的镜像源。

    添加代码到 <mirrors>

    <mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/repositories/central/</url> </mirror> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>central</id> <name>Maven Repository Switchboard</name> <url>http://repo1.maven.org/maven2/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>repo2</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://repo2.maven.org/maven2/</url> </mirror> <mirror> <id>ibiblio</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url> </mirror> <mirror> <id>jboss-public-repository-group</id> <mirrorOf>central</mirrorOf> <name>JBoss Public Repository Group</name> <url>http://repository.jboss.org/nexus/content/groups/public</url> </mirror> <mirror> <id>google-maven-central</id> <name>Google Maven Central</name> <url>https://maven-central.storage.googleapis.com </url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>maven.net.cn</id> <name>oneof the central mirrors in china</name> <url>http://maven.net.cn/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror>

刷新idea项目完美解决

相关推荐
凤山老林1 小时前
04-Java JDK, JRE和JVM
java·开发语言·jvm
camellias_8 小时前
【无标题】
java·tomcat
咸鱼2.08 小时前
【java入门到放弃】需要背诵
java·开发语言
椰猫子8 小时前
Java:异常(exception)
java·开发语言
win x9 小时前
Redis 使用~如何在Java中连接使用redis
java·数据库·redis
星晨雪海9 小时前
基于 @Resource 的支付 Service 多实现类完整示例
java·开发语言
阿维的博客日记9 小时前
什么是逃逸分析
java·juc
Ricky_Theseus10 小时前
C++右值引用
java·开发语言·c++
Rick199310 小时前
Java内存参数解析
java·开发语言·jvm
我是大猴子10 小时前
Spring代理类为何依赖注入失效?
java·后端·spring