Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 696
alphabytes Avatar asked Aug 15 '11 13:08

alphabytes


2 Answers

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.
like image 153
Iker Jimenez Avatar answered Oct 23 '22 11:10

Iker Jimenez


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.

like image 42
mplwork Avatar answered Oct 23 '22 10:10

mplwork