2015-08-25 40 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