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

相关推荐
2501_9153738817 分钟前
Java调用C++教程:JNI与JNA两种方式详解
java·开发语言·c++
代码的余温33 分钟前
Marshalling与Demarshalling深度解析
java·分布式·跨进程通信
好学且牛逼的马33 分钟前
#13 学习反馈
java·学习·ai编程
在下uptown1 小时前
数据同步系统搭建方案
java·后端·架构
_extraordinary_1 小时前
Java String的使用续 -- StringBuilder类和StringBuffer
java·开发语言
用户611847265421 小时前
《Java 实战:用 Spring Boot 快速构建一个 RESTful 接口服务》
java
程序员岳焱1 小时前
11.Java I/O 流:文件读写与数据持久化
java·后端
~央千澈~1 小时前
评论功能开发全解析:从数据库设计到多语言实现-优雅草卓伊凡
java·前端·数据库
异常君1 小时前
Java 调用 Python:五种实用方法全面对比与实战案例
java·python
谷宇1 小时前
【Java基础-环境搭建-创建项目】IntelliJ IDEA创建Java项目的详细步骤
java