IDEA maven 阿里云镜像下载依赖出现证书验证问题

自己电脑搭建个人demo的时候,一直出现:Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE from/to nexus-aliyun (https://maven.aliyun.com/repository/central):: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

 

由于之前有修改过hosts,还原后也尝试了各种办法,都没有结果

后经无数搜索:在settings-build-maven-runner添加如下参数即可:

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

IDEA maven 阿里云镜像下载依赖出现证书验证问题