簡體   English   中英

Eclipse中的Maven構建失敗

[英]maven build failure in eclipse

我正在嘗試在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

請在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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM