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

4

27

I am facing a situation where my eclipse indigo is "Unable to update index for central|http://repo1.maven.org/maven2".

I am using an external Maven 3.0.3 installation and m2eclipse configured with Eclipse Indigo and I am definitely not behind any proxy.

Also my networking configuration in eclipse is all set to direct and I am still unable to update the indices.

What may I have overlooked? I have searched on Google and other forums but am unable to resolve it.

Shovelnose answered 15/8, 2011 at 13:26 Comment(1)
I had a similar problem (but behind a proxy), and I had to reload the settings.xml. I think the information that the index could not be updated is cached somehere, and after reloading the settings.xml, this cache was cleared. You have to have at least a user settings.xml XOR the reference to an installed Maven runtime (which you have configured).Polarimeter
C
41

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.
Cyathus answered 2/8, 2012 at 10:38 Comment(3)
What if there is no "org.maven.ide.eclipse" folder?Virulent
i don't have workspace_location/.metadata/.plugins/org.maven.ide.eclipse/nexus but it works anywayGaslit
@Virulent Be patient dear, patientNinefold
M
1

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.

Misty answered 1/8, 2013 at 17:36 Comment(0)
W
0

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.

Whosoever answered 13/11, 2012 at 14:49 Comment(0)
A
0

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”.

Approbation answered 25/7, 2015 at 15:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.