Idea导入maven项目踩坑

553 阅读1分钟

今天导入idea从github上拉取的springboot项目的时候,老是报错parent划红。

could not transfer artifact org.springframework.boot:spring-boot-starter-
parent:pom:2.2.5.RELEASE from/to nexus-aliyun 
(https://maven.aliyun.com/nexus/content/groups/public): PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification 
path to requested target

解决方法: 在Maven命令后加入参数“-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true 这样设置可以跳过证书检查。

另一个问题:settings.xml文件中的路径名不能写错,正确的分隔符应当是“\\”和“/”。