我已经搜索过并搜索过没有解决这个问题的运气。有人可以告诉我我可以做些什么来解决这个问题吗?
在我的工作项目工作空间中运行以下命令
mvn compile
产生以下错误。
[ERROR] Failed to execute goal on project acme: Could not resolve
dependencies for
project com.acmecorp.acme:acme:war:GUI 5.0: Failed to collect dependencies at
org.springframework:spring-core:jar:4.0.2.RELEASE: Failed to read artifact descriptor
for org.springframework:spring-core:jar:4.0.2.RELEASE: Could not transfer
artifact org.springframework:spring-core:pom:4.0.2.RELEASE 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]
是的,我已经在.m2文件夹的settings.xml文件中检查了我的代理。这是它的样子。
<proxies>
<proxy>
<active>true</active>
<protocol>https</protocol>
<username>USER</username>
<password>PASS</password>
<host>proxy.host.com</host>
<port>80</port>
</proxy>
<proxy>
<active>true</active>
<protocol>http</protocol>
<username>USER</username>
<password>PASS</password>
<host>proxy.host.com</host>
<port>80</port>
</proxy>
</proxies>
任何建议都将不胜感激。
OS Windows 7
答案 0 :(得分:1)
您需要获取maven repo服务器的ssl证书并将其复制到本地jre / lib / security文件夹中。
步骤: 1.下载此Java程序https://confluence.atlassian.com/download/attachments/180292346/InstallCert.java
详细步骤请参阅以下文章: