2014-01-16 48 views
0

建立失敗我試圖在Eclipse中構建一個簡單的Web應用程序,但得到以下錯誤行家在eclipse

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of the configured repositories. 
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-webapp:jar:RELEASE 
Failure to transfer org.apache.maven.archetypes:maven-archetype-webapp:jar:1.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 org.apache.maven.archetypes:maven-archetype-webapp:jar:1.0 from/to central (http://repo.maven.apache.org/maven2): Access denied to http://repo.maven.apache.org/maven2/org/apache/maven/archetypes/maven-archetype-webapp/1.0/maven-archetype-webapp-1.0.jar. Error code 403, Forbidden: body content-type denied 
Failure to transfer org.apache.maven.archetypes:maven-archetype-webapp:jar:1.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 org.apache.maven.archetypes:maven-archetype-webapp:jar:1.0 from/to central (http://repo.maven.apache.org/maven2): Access denied to http://repo.maven.apache.org/maven2/org/apache/maven/archetypes/maven-archetype-webapp/1.0/maven-archetype-webapp-1.0.jar. Error code 403, Forbidden: body content-type denied 
+0

嘗試清洗它,然後重建它.. –

回答

0

請嘗試在Eclipse下面的步驟。它應該幫助你。

1. Open Window > Preferences 
2. Open Maven > Archetypes 
3. Click 'Add Remote Catalog' and add the following: 
    a) Catalog File: http://repo1.maven.org/maven2/archetype-catalog.xml 
    b) Description: maven catalog 
+0

我想你的建議,但仍是問題仍然存在 – Sudip7

+1

請覈實,在Eclipse中,Windows的偏好,Maven的UserSettings,請檢查用戶設置文件(設置。 xml)存在,並且該文件內的代理設置正確指向您的代理服務器。 –