1. 程式人生 > >pom.xml遇到第一行報錯

pom.xml遇到第一行報錯

給大家分享下在pom.xml第一行遇到的問題: Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 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.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from/to central (

https://repo.maven.apache.org/maven2

): repo.maven.apache.org 解決方法如下: 在你的本地倉庫找到以下檔案進行刪除: D:\study_maven\apache-maven-3.5.0-bin\apache-maven-3.5.0-bin\mvn_repository\org\apache\maven\plugins,這個是我的路徑,我的本地倉庫是mvn_repository,在這個路徑下找到maven-surefire-plugin這個進行刪除,其次,更新maven,重新載入maven-surefire-plugin 即可解決