无法从 Maven 下载项目依赖项 (db4o):证书错误
我有一个 Maven 项目,并使用 这个答案 添加了 db4o 作为依赖项上一个问题。当我编译项目时,出现以下错误:
无法解决依赖关系 项目 org.uca.dss:trenes:jar:1.0-SNAPSHOT: [...] 无法读取工件 描述符为 com.db4o:db4o-full-java5:jar:7.13-SNAPSHOT: 无法传输工件 com.db4o:db4o-full-java5:pom:7.13-SNAPSHOT 从/到 source.db4o (https://source.db4o.com/maven/): 传输文件时出错: sun.security.validator.ValidatorException: PKIX 路径构建失败: sun.security.provider.certpath.SunCertPathBuilderException: 无法找到有效的认证 请求目标的路径 -> [帮助1]
奇怪的是,它只发生在 Ubuntu GNU/Linux 中(在两台 PC 上测试),但不会发生在 Windows 中(使用 NetBeans 7.0)。
我可以发布完整的错误(来自 maven -X 输出),但我认为它没有添加太多信息
编辑 1: 这是我的 pom.xml
文件中关于 db4o 的内容:
<repository>
<id>source.db4o</id>
<url>https://source.db4o.com/maven/</url>
</repository>
...
<dependency>
<groupId>com.db4o</groupId>
<artifactId>db4o-full-java5</artifactId>
<version>7.13-SNAPSHOT</version>
</dependency>
I have a Maven project and added db4o as a dependency using this answer from a previous question. When I compile the project it gives me the following error:
Could not resolve dependencies for
project
org.uca.dss:trenes:jar:1.0-SNAPSHOT:
[...] Failed to read artifact
descriptor for
com.db4o:db4o-full-java5:jar:7.13-SNAPSHOT:
Could not transfer artifact
com.db4o:db4o-full-java5:pom:7.13-SNAPSHOT
from/to source.db4o
(https://source.db4o.com/maven/):
Error transferring file:
sun.security.validator.ValidatorException:
PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification
path to requested target -> [Help 1]
Curiously enough, it only happens in Ubuntu GNU/Linux (tested in two PC's), but not in Windows (using NetBeans 7.0).
I can post the full error (from maven -X output), but I think it does not add much information
Edit 1:
This is what I have in my pom.xml
file regarding db4o:
<repository>
<id>source.db4o</id>
<url>https://source.db4o.com/maven/</url>
</repository>
...
<dependency>
<groupId>com.db4o</groupId>
<artifactId>db4o-full-java5</artifactId>
<version>7.13-SNAPSHOT</version>
</dependency>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这看起来像是安全请求的安全证书问题,通常从
%JAVA_HOME%\jre\lib\security\cacerts
查找。我猜测您的windows JRE
有这些条目,而ubuntu JRE
缺少它们。顺便说一句,这个链接是关于安装证书的好读物。您可能想使用那里提到的选项 1。
This looks like a security certificate issue for a secured request which is generally looked up from
%JAVA_HOME%\jre\lib\security\cacerts
. I am guessing yourwindows JRE
has the entries whereas theubuntu JRE
is lacking them.By the way this link is a good read on installing certs. You probably want to use the option 1 mentioned there.