我正在使用 Eclipse Oxygen,并且我已经安装了 Nexus OSS Repository Manager。在 Window->Preferences->Maven 我检查了启动时下载存储库索引更新。
在启动时 Eclipse 正在尝试更新 Nexus 的索引,这需要一段时间。但在那之后我收到一个错误,说它无法更新关系索引。
从日志中我提取相关行:
!ENTRY org.eclipse.m2e.logback.appender 4 0 2017-07-04 10:55:22.312
!MESSAGE Unable to update index for nexus|http://localhost:8081/nexus/content/groups/public/: .m2\repository\.cache\m2e\1.8.0\33b5073b9c3fc53d62eb8dc83e442c3d\nexus-maven-repository-index.zip (The system cannot find the file specified)
!STACK 0
java.io.FileNotFoundException: .m2\repository\.cache\m2e\1.8.0\33b5073b9c3fc53d62eb8dc83e442c3d\nexus-maven-repository-index.zip (The system cannot find the file specified)...
当我尝试启动新的 Maven 项目并选择 Nexus Indexer 作为目录时,我收到错误消息:No archetypes currently available. The archetype list will refresh when the indexes finish updating.
我对 Eclipse 为什么要寻找 nexus-maven-repository-index.zip 而不是 nexus-maven-repository-index.gz 感兴趣?
在文件夹 .m2\repository.cache\m2e\1.8.0\33b5073b9c3fc53d62eb8dc83e442c3d\ 我有三个文件:nexus-maven-repository-index.gz (360 MB), nexus-maven-repository-index.properties (180 B)和 chunks.lst (0B)。没有 nexus-maven-repository-index.zip。
我在 Stackoverlow 上搜索过解决方案,尝试了很多东西,对这个问题做了一些改进(比现在更糟),但没有解决。