方式一:
大部分人会有这种问题,直接修改即可,请参考持.之.以.恒
IDEA中Maven依赖包无法下载或导入问题解决办法
二
maven使用阿里数据源不能生效,如这种
Could not transfer artifact org.springframework.boot:spring-
boot-/dependencies:pom:1.5.10.RELEASE from/to alimaven
(http://maven.aliyun.com/nexus/content/groups/public/):
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid
certification path to requested target
原因:
由于阿里仓库地址更新成https后,下载需要使用ssl认证,如果本地没有配置的话,导致依然使用的是默认仓库.
解决:
修改maven项目中虚拟机参数,添加忽略ssl的配置,Maven -> Runner -> VM Options添加**
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true
它实现maven对数据源供应商的http访问,能够使用存储在HTTP服务器中的远程存储库。
关于这方面,可以访问官网Apache Maven Project/Maven Wagon HTTP