gpt4 book ai didi

java - Maven 构建问题 : PKIX path building failed

转载 作者:太空宇宙 更新时间:2023-11-04 11:57:26 25 4
gpt4 key购买 nike

在我们使用 maven 构建的应用程序中,构建过程的一部分是检索存档中的文件以包含它们以供运行时使用。该存档托管在 sourceforge ( here ) 上,检索工作完美无缺,直到几周前开始出现此消息:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (process-resources-windows) on project ums-core: An Ant BuildException has occured: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[ERROR] around Ant part ...<get usetimestamp="true" src="http://downloads.sourceforge.net/project/ums-mlx/ums-tools/win32/transcode-tools-win32-20160915.tar.gz" dest="E:\dev\ums-mlx\ums-mlx\core/src/main/external-resources/transcode-tools/transcode-tools-win32-20160915.tar.gz"/>... @ 5:255 in E:\dev\ums-mlx\ums-mlx\core\target\antrun\build-main.xml

一些在线搜索让我找到了this post解释如何将受信任的证书添加到 java keystore 。

所以我检查了正在使用的证书: used certficate

导出证书(我认为正在使用): exported certificate

并导入它:

C:\Program Files\Java\jdk1.8.0_91\jre\bin>keytool -import -keystore ..\lib\security\cacerts -file c:\root.cer
Enter keystore password:
Certificate was added to keystore

第二次导入会产生以下消息:

C:\Program Files\Java\jdk1.8.0_91\jre\bin>keytool -import -keystore ..\lib\security\cacerts -file c:\root.cer
Enter keystore password:
keytool error: java.lang.Exception: Certificate not imported, alias <mykey> already exists

执行 keytool -list -keystore ..\lib\security\cacerts 时,会显示以下与 GeoTrust 相关的条目:

Line 53: geotrustuniversalca, 10-Dec-2009, trustedCertEntry,
Line 67: geotrustprimaryca, 10-Dec-2009, trustedCertEntry,
Line 133: geotrustglobalca, 18-Jul-2003, trustedCertEntry,
Line 169: geotrustprimarycag3, 10-Dec-2009, trustedCertEntry,
Line 171: geotrustprimarycag2, 10-Dec-2009, trustedCertEntry,

有人知道为了使构建过程再次正常工作缺少什么吗?

[编辑]使用的maven版本是:

E:\dev\ums-mlx\ums-mlx>mvn -v
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T18:29:23+01:00)
Maven home: C:\Program Files (x86)\apache-maven-3.2.5
Java version: 1.8.0_91, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_91\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"

最佳答案

原来是升级java jdk到8u121解决了这个问题!?

关于java - Maven 构建问题 : PKIX path building failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41239573/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com