9

I am trying to rebuild the Maven index in Eclipse, but it has been stuck at 0% for hours.

I can't find any results when trying to add dependencies. I have tried running Eclipse as an Administrator and ticking "update repositories" on startup, but neither option worked.

I am using Windows 8.1 Enterprise Edition

Rebuilding Indexes: (0%)

Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
Mohammed Adel
  • 177
  • 1
  • 3
  • 10

2 Answers2

11
  1. Leave Eclipse
  2. Go to [your-workspace-folder]
  3. Remove .metadata/.plugins/org.eclipse.m2e.core/nexus
  4. Remove .metadata/.plugins/org.maven.ide.eclipse/nexus
  5. Restart Eclipse

If it does not help, try also

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

See also https://stackoverflow.com/a/16444984/2886891


To prevent the impact of various bugs from the m2e plugin, I prefer using always the external maven (you have to have it installed of course):

enter image description here

Community
  • 1
  • 1
Honza Zidek
  • 9,204
  • 4
  • 72
  • 118
4

Do this, just as Honza Zidek did:

  1. Leave Eclipse
  2. Go to [your-workspace-folder]
  3. Remove .metadata/.plugins/org.eclipse.m2e.core/nexus
  4. Remove .metadata/.plugins/org.maven.ide.eclipse/nexus
  5. Restart Eclipse
  6. remove [your-home-folder]/.m2/repository/.cache/m2e.

Click Window -> Show view -> Other -> Maven Repositories In the appeared tab click Global Repositories. Right click on central -> Rebuild Index.

It took me 30 minutes to rebuild it. All the time Progress bar was 0%. Eclipse downloaded about 10Gb in [your-home-folder]/.m2/repository folder. Then it deleted 8Gb.

To check if download is going, just refresh C drive (or the drive .m2 folder is loceted).

Mihai
  • 336
  • 2
  • 7