【发布时间】:2011-05-08 05:44:04
【问题描述】:
我已将以下存储库添加到我的 Maven 项目的 pom.xml:
<repository>
<id>maven2-repository.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2</url>
<layout>default</layout>
</repository>
但是,当尝试在 Eclipse 中构建存储库索引时,Maven 控制台中会出现以下错误消息:
!MESSAGE Unable to update index for maven2-repository.java.net|http://download.java.net/maven/2
!STACK 0
java.io.IOException: Server returned status code 404: Not found
随后是堆栈跟踪的其余部分。
我已经能够确定 Maven 正在寻找 URL http://download.java.net/maven/2/.index/nexus-maven-repository-index.gz
但找不到。相反,这个相同的文件似乎确实存在: http://download.java.net/maven/2/.index/nexus-maven-repository-index.zip
存档文件格式有什么区别,有什么方法可以强制 Maven(或 Eclipse 的 m2eclipse 插件)寻找正确的文件扩展名?
谢谢
【问题讨论】: