java - mvn clean : PKIX path building failed: sun. security.provider.certpath.SunCertPathBuilderException

标签 java maven pkix

使用正确的settings.xml文件,但在执行mvn clean命令时出现以下错误:

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myproject 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-source-plugin/2.2/maven-source-plugin-2.2.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.290 s
[INFO] Finished at: 2017-01-02T16:16:12+05:30
[INFO] Final Memory: 10M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-source-plugin:2.2 or one of its de
pendencies could not be resolved: Failed to read artifact descriptor for org.apa
che.maven.plugins:maven-source-plugin:jar:2.2: Could not transfer artifact org.a
pache.maven.plugins:maven-source-plugin:pom:2.2 from/to central (https://repo.ma
ven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path bui
lding failed: sun.security.provider.certpath.SunCertPathBuilderException: unable
 to find valid certification path to requested target -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException

此错误导致什么问题PKIX路径bui lding 失败:sun.security.provider.certpath.SunCertPathBuilderException

最佳答案

https://repo.ma 暴露的证书 ven.apache.org/maven2 在您的计算机上无效。也许您已从 Java 信任库中删除了证书或已将本地时间更改为 future 的日期?

关于java - mvn clean : PKIX path building failed: sun. security.provider.certpath.SunCertPathBuilderException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41426928/

相关文章:

java - 周围的 try/catch 是否会破坏 for 循环?

java - PKIX 路径构建失败 : SunCertPathBuilderException: unable to find valid certification path to requested target

在 Heroku 中部署 war 文件时出现 java.lang.OutOfMemoryError

java - 如何在 OpenCV 中设置感兴趣区域 - JAVA

java - Maven 全局插件配置

java - 如何在maven项目中添加jnetpcap作为依赖项?

java - 从树数据结构打印纯文本树(java)

java - Eclipse Maven 更新抛出 SunCertPathBuilderException

java - 如何在 gradle 构建脚本中传递 trustStore 属性

java - 处理 csv 文件的不同分隔符