1. 程式人生 > >Failure to transfer org.springframework:spring-jcl:jar:5.0.7.RELEASE from

Failure to transfer org.springframework:spring-jcl:jar:5.0.7.RELEASE from

錯誤資訊:

Failure to transfer org.springframework.boot:spring-boot-maven-plugin:pom:1.5.4.RELEASE from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact 

org.springframework.boot:spring-boot-maven-plugin:pom:1.5.4.RELEASE from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org pom.xml

  原本程式碼並沒出錯,但是在匯入專案到新環境下後,出現了這種錯誤。發生的問題根本原因 在於 網路環境導致 依賴的包在下載的過程中出現的異常中斷,導致引用資源損壞

解決辦法:

cmd中:

cd %userprofile%\.m2\repository
for /r %i in (*.lastUpdated) do del %i

然後在eclipse中右鍵,選擇Maven - >“Update Project”,確保勾選“Update Dependencies”,然後點確定

解決方法原文:

https://stackoverflow.com/questions/5074063/maven-error-failure-to-transfer