錯誤信息:
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