重建Maven指数坚持0%

我正在尝试在Eclipse中重建Maven索引 ,但它已经停留在0%几小时。

尝试添加依赖项时,我找不到任何结果。 我已经尝试以管理员身份运行Eclipse并在启动时勾选“更新存储库”,但这两个选项均无效。

我使用的是Windows 8.1企业版

重建指数:(0%)

  1. 离开Eclipse
  2. 转到[your-workspace-folder]
  3. 删除.metadata / .plugins / org.eclipse.m2e.core / nexus
  4. 删除.metadata / .plugins / org.maven.ide.eclipse / nexus
  5. 重启Eclipse

如果它没有帮助,请尝试

  1. 删除[your-home-folder] /。m2 / repository / .cache / m2e / $ {m2e.version}。

另请参见https://stackoverflow.com/a/16444984/2886891


为了防止 m2e插件中的各种错误的影响,我更喜欢永远使用外部 maven(当然你必须安装它):

在此处输入图像描述

这样做,正如Honza Zidek所做的那样:

  1. 离开Eclipse
  2. 转到[your-workspace-folder]
  3. 删除.metadata / .plugins / org.eclipse.m2e.core / nexus
  4. 删除.metadata / .plugins / org.maven.ide.eclipse / nexus
  5. 重启Eclipse
  6. 删除[your-home-folder] /。m2 / repository / .cache / m2e。

单击窗口 – >显示视图 – >其他 – > Maven存储库在出现的选项卡中单击全局存储库。 右键单击中央 – >重建索引。

我花了30分钟重建它。 进度条始终为0% 。 Eclipse在[your-home-folder] /.m2 / repository文件夹中下载了大约10Gb。 然后它删除了8Gb。

要检查是否正在下载,只需刷新C驱动器(或找到驱动器.m2文件夹)。