0
我試圖將guice添加到我的Google App Engine項目中。我使用Maven和Eclipse。在Eclipse中,我修改了我的pom.xml中加入下面的<dependencies>
元素按http://mvnrepository.com/artifact/com.google.inject/guice/3.0:當添加guice時出現eclipse錯誤ArtifactTransferException
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
</dependency>
然而,Eclipse已經提出了四個錯誤:
Description Resource Path Location Type
ArtifactTransferException: Failure to transfer com.google.inject:guice:jar:3.0 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 com.google.inject:guice:jar:3.0 from/to central (http://repo.maven.apache.org/maven2): connect timed out pom.xml /audiencemarketing-backend line 123 Maven Dependency Problem
Description Resource Path Location Type
Missing artifact com.google.inject:guice:jar:3.0 pom.xml /audiencemarketing-backend line 1 Maven Dependency Problem
Description Resource Path Location Type
The container 'Maven Dependencies' references non existing library '/Users/mosofsky/.m2/repository/com/google/inject/guice/3.0/guice-3.0.jar' audiencemarketing-backend Build path Build Path Problem
Description Resource Path Location Type
The project cannot be built until build path errors are resolved audiencemarketing-backend Unknown Java Problem
我曾嘗試用鼠標右鍵單擊我的項目並選擇Maven =>更新項目。但我仍然得到相同的4個錯誤。我也嘗試過Project => Clean和同樣的事情。
如何正確添加Guice給定我的設置?