1. 程式人生 > >建立maven的web工程出現pom檔案報錯

建立maven的web工程出現pom檔案報錯

Failure to transfer org.apache.maven.surefire:surefire:pom:2.10 from
http://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.surefire:surefire:pom:2.10 from/to central
(

http://repo.maven.apache.org/maven2): java.net.ConnectException:
connection timed out to
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/2.10/surefire-2.10.pom

如果出現類似問題,1、檢查maven的本地倉庫:搜尋“*.lastUpdated”檔案,請將該檔案刪除;
2、右鍵點選project -> Maven - Update Dependencies;同時選擇force update可以解決此類問題。