在我们使用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密钥库。
并将其导入:
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,
是否有人知道缺少什么才能使构建过程再次起作用?
[edit]使用的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"
答案 0 :(得分:0)
原来,将java jdk升级到8u121解决了这个问题!?