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项目完美解决

相关推荐
Zzxy2 小时前
HikariCP连接池
java·数据库
罗超驿2 小时前
Java数据结构_栈_算法题
java·数据结构·
希望永不加班2 小时前
SpringBoot 主启动类解释:@SpringBootApplication 到底做了什么
java·spring boot·后端·spring
蝎子莱莱爱打怪3 小时前
别再裸用 Claude Code 了!32 个亲测Skills + 8 个 MCP,开发效率直接拉满!
java·后端·claude
野犬寒鸦3 小时前
JVM垃圾回收机制面试常问问题及详解
java·服务器·开发语言·jvm·后端·算法·面试
_杨瀚博3 小时前
JAVA找出哪个类import了不存在的类
java·后端
OKkankan3 小时前
深入理解linux进程
java·linux·c++
脑电信号要分类4 小时前
将多张图片拼接成一个pdf文件输出
pdf·c#·apache
java1234_小锋4 小时前
Java高频面试题:Spring-AOP通知和执行顺序?
java·开发语言·spring
番茄去哪了4 小时前
Java基础面试题day02
java·开发语言·面向对象编程