Maven repository index cannot be built due to 404 when trying to access GZ instead of ZIP
I've added the following repository to my Maven project's 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>
However when attempting to build the repository index in Eclipse, the following error message appears in the Maven console:
!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
Followed by the rest of the stack trace.
I'开发者_运维问答ve been able to determine that Maven is looking for the URL http://download.java.net/maven/2/.index/nexus-maven-repository-index.gz
but can't find it. Instead, this identical file does seem to exist: http://download.java.net/maven/2/.index/nexus-maven-repository-index.zip
What's with the archive file format difference, and is there any way to force Maven (or the m2eclipse plug-in for Eclipse) to look for the correct file extension?
Thanks
From what I've been able to figure out, the ZIP file is a legacy format index file. However, I can't get to the m2eclipse sources at the moment (the git.eclipse.org site is not responding) to figure out why m2eclipse doesn't fall back to the legacy format if the preferred format is missing ... or whether there's a way to force m2eclipse to use the legacy format.
精彩评论