日食中的maven构建失败

时间:2014-01-16 07:07:04

标签: java eclipse maven

我正在尝试在eclipse中构建一个简单的webapp,但是会出现以下错误

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

1 个答案:

答案 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