Classic error: Unable to update index for central|http://repo1.maven.org/maven2

最后都变了- 提交于 2019-11-27 19:03:40

From Wojtek's link.

  1. Close Eclipse
  2. Delete workspace_location/.metadata/.plugins/org.maven.ide.eclipse/nexus
  3. Delete workspace_location/.metadata/.plugins/org.eclipse.m2e.core/nexus
  4. Go to Window->Preferences->Maven and enable checkbox named “Download repository index updates on startup”.
  5. OK and restart Eclipse.

Just having had the same problem. Turned out the m2e plugin can't handle encrypted passwords in settings.xml. Just entered the plain password and updating the index worked again. Dependency download were not affected. They work just fine with encrypted passwords. Looks like a bug to me.

I have tried all these lesser deletes, but it won't help. A colleague advised to delete the whole .metadata folder. Later import projects from their place or checkout them from the svn(if you use some). This is not much more complicated, but it helped. the problem is that we don't really know, what metadata are broken, so the natural next step is to delete all of them. I think, it is the deepest possible cleaning before reinstallation of Eclipse + plugins.

I had to update Maven Plugin. It was not working. (Help menu > Eclipse Marketplace > type Maven > click magnifying glass) > Select Maven Plugin > Update

And then Go to Window->Preferences->Maven and enable checkbox named “Download repository index updates on startup”.

If after what's being said you have the problem again you can delete the folder .m2 from my documents or /home and let your IDE re-download the folder for you, it solved the same problem of mine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!