2015-08-25 95 views
0

我搜索并搜索到没有运气解决此问题。有人能告诉我我能做些什么来解决这个问题吗?Maven构建失败,无法在org.springframework上收集依赖关系:spring-core:jar:4.0.2.RELEASE

在我工作的项目工作区

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> 

任何建议将不胜感激。

操作系统Windows 7

+0

下载jar由maven更新 – VedX

回答

1

你需要得到行家回购服务器的SSL证书,并复制到本地的jre/lib/security中的文件夹。

步骤: 1.下载该Java程序https://confluence.atlassian.com/download/attachments/180292346/InstallCert.java

  • 编译
  • 运行命令行参数行家回购服务器
  • 复制生成的SSL到本地JRE/lib/security中
  • 有关详细步骤PL遵循这个帖子:

    http://www.mkyong.com/webservices/jax-ws/suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/

    +1

    你能提供一些指导如何做到这一点吗? – BaconJuice