【问题标题】:Maven repository index cannot be built due to 404 when trying to access GZ instead of ZIP尝试访问 GZ 而不是 ZIP 时,由于 404 无法构建 Maven 存储库索引
【发布时间】: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 插件)寻找正确的文件扩展名?

谢谢

【问题讨论】:

    标签: java eclipse maven-2


    【解决方案1】:

    据我所知,ZIP 文件是传统格式的索引文件。但是,我目前无法访问 m2eclipse 源(git.eclipse.org 站点没有响应)来弄清楚为什么如果缺少首选格式,m2eclipse 不会回退到旧格式......或者是否有办法强制 m2eclipse 使用旧格式。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-11-07
      • 2016-07-08
      • 1970-01-01
      • 1970-01-01
      • 2011-01-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多