Idea中 maven 下载jar出现证书问题

目录

[1: 具体错误:](#1: 具体错误:)

[2: 忽略证书代码:](#2: 忽略证书代码:)

[3: 关闭所有idea, 清除缓存, 在下面添加如上忽略证书代码](#3: 关闭所有idea, 清除缓存, 在下面添加如上忽略证书代码)

[4:执行 maven clean 然后刷刷新依赖](#4:执行 maven clean 然后刷刷新依赖)

完成,撒花!!!!!!


1: 具体错误:

Could not transfer artifact org.springframework.boot:spring-boot-dependencies:pom:2.3.7.RELEASE from/to aliyunmaven (https://maven.aliyun.com/repository/public): transfer failed for https://maven.aliyun.com/repository/public/org/springframework/boot/spring-boot-dependencies/2.3.7.RELEASE/spring-boot-dependencies-2.3.7.RELEASE.pom

"C:\Program Files\Java\jdk1.8.0_202\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\LTNEW\unicom-alarm -Djansi.passthrough=true -Dmaven.home=D:\apache-maven-3.8.2 -Dclassworlds.conf=D:\apache-maven-3.8.2\bin\m2.conf "-Dmaven.ext.class.path=D:\Program Files\JetBrains\IntelliJ IDEA 2024.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2024.1\lib\idea_rt.jar=64042:D:\Program Files\JetBrains\IntelliJ IDEA 2024.1\bin" -Dfile.encoding=UTF-8 -classpath D:\apache-maven-3.8.2\boot\plexus-classworlds-2.6.0.jar;D:\apache-maven-3.8.2\boot\plexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version=2024.1 -s D:\apache-maven-3.8.2\conf\settings.xml -Dmaven.repo.local=D:\apache-maven-3.8.2\Jar -DskipTests=true clean
[INFO] Scanning for projects...
Downloading from aliyunmaven: https://maven.aliyun.com/repository/public/org/springframework/boot/spring-boot-dependencies/2.3.7.RELEASE/spring-boot-dependencies-2.3.7.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not transfer artifact org.springframework.boot:spring-boot-dependencies:pom:2.3.7.RELEASE from/to aliyunmaven (https://maven.aliyun.com/repository/public): transfer failed for https://maven.aliyun.com/repository/public/org/springframework/boot/spring-boot-dependencies/2.3.7.RELEASE/spring-boot-dependencies-2.3.7.RELEASE.pom @ line 208, column 25
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-web:jar is missing. @ line 65, column 21
[WARNING] 'dependencies.dependency.scope' for org.springframework.boot:spring-boot-dependencies:pom must be one of [provided, compile, runtime, test, system] but is 'import'. @ line 76, column 20
[ERROR] 'dependencies.dependency.version' for mysql:mysql-connector-java:jar is missing. @ line 86, column 21
[ERROR] 'dependencies.dependency.version' for org.projectlombok:lombok:jar is missing. @ line 110, column 21
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-test:jar is missing. @ line 115, column 21
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-data-redis:jar is missing. @ line 153, column 21
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.chinaunicom.sh:unicom-alarm:0.0.1-SNAPSHOT (D:\LTNEW\unicom-alarm\pom.xml) has 6 errors
[ERROR]     Non-resolvable import POM: Could not transfer artifact org.springframework.boot:spring-boot-dependencies:pom:2.3.7.RELEASE from/to aliyunmaven (https://maven.aliyun.com/repository/public): transfer failed for https://maven.aliyun.com/repository/public/org/springframework/boot/spring-boot-dependencies/2.3.7.RELEASE/spring-boot-dependencies-2.3.7.RELEASE.pom @ line 208, column 25: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 2]
[ERROR]     'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-web:jar is missing. @ line 65, column 21
[ERROR]     'dependencies.dependency.version' for mysql:mysql-connector-java:jar is missing. @ line 86, column 21
[ERROR]     'dependencies.dependency.version' for org.projectlombok:lombok:jar is missing. @ line 110, column 21
[ERROR]     'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-test:jar is missing. @ line 115, column 21
[ERROR]     'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-data-redis:jar is missing. @ line 153, column 21
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

进程已结束,退出代码为 1

2: 忽略证书代码:

-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true

3: 关闭所有idea, 清除缓存, 在下面添加如上忽略证书代码

4:执行 maven clean 然后刷刷新依赖

完成,撒花!!!!!!

相关推荐
小张认为的测试6 小时前
Liunx上Jenkins 持续集成 Java + Maven + TestNG + Allure + Rest-Assured 接口自动化项目
java·ci/cd·jenkins·maven·接口·testng
花心蝴蝶.21 小时前
Maven 快速上手
java·maven
基哥的奋斗历程1 天前
学到一些小知识关于Maven 与 logback 与 jpa 日志
java·数据库·maven
蒙双眼看世界1 天前
IDEA运行Java项目总会报程序包xxx不存在
java·spring·maven
Ting-yu1 天前
项目实战--网页五子棋(游戏大厅)(3)
java·java-ee·maven·intellij-idea
null_equals2 天前
你还在用idea吗
java·ide·intellij-idea
Java知识技术分享2 天前
SecureUtil.aes数据加密工具类
java·后端·intellij-idea
m0_512744642 天前
如何在idea中搭建SpringBoot项目
java·spring boot·intellij-idea
123yhy传奇2 天前
【学习总结|DAY034】Maven高级
java·学习·maven
m0_748241233 天前
SpringBoot Maven 项目 pom 中的 plugin 插件用法整理
spring boot·后端·maven