解决idea Could not transfer artifact org.springframework.bootspring-b

报错代码
Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.2.4.RELEASE from/to alimaven (https://maven.aliyun.com/repository/central): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Solution 1:

原因:证书问题
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

insert image description here

Added content

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

Solution 2: Modify the mirror address
because the default is foreign, it may cause download problems ----> Set up a domestic mirror website

path

insert image description here
Add it here (I have already added it, the default is none)

insert image description here

Provide an Alibaba Cloud address

 <mirror>
		<id>nexus-aliyun</id>
		<mirrorOf>central</mirrorOf>
		<name>Nexus aliyun</name>
		<url>https://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>

Other methods:
do this, my problem has been solved, if you still haven't solved it here and you are using maven for the first time as a project, then it is very likely that there is a problem with your maven, the method is to delete and reconfigure (don't Thinking about changing him), I didn't know what was wrong with my previous 3.6.0 and 3.6.3, the current version is 3.5.2

Guess you like

Origin blog.csdn.net/m0_54850467/article/details/123714773