使用maven打包时报错PKIX path building failed: sun.security.provider.certpath

[ERROR] Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4: Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]

解决办法:

在settings.xml文件中添加中心库的配置。


     
    Central   
    http://repo1.maven.org/maven2   
    central
   
    
 
 

 

 

你可能感兴趣的:(使用maven打包时报错PKIX path building failed: sun.security.provider.certpath)