53

When I load up a workspace (for Android Java development), Eclipse says in the status bar that it's updating indexes. The Progress tab reports that it's hitting maven.org.

I read up on Maven - seems like a build manager. What I don't understand is why my Android workspace needs it or why it's hitting the server in the cloud. Do I need it? If not, how do I safely remove it?

enter image description here

ziesemer
  • 27,712
  • 8
  • 86
  • 94
AngryHacker
  • 59,598
  • 102
  • 325
  • 594

1 Answers1

96

This is a general step that happens when m2e/m2eclipse (Maven integration for Eclipse) is installed, whether projects are actively using it or not.

This step can be disabled through the Eclipse preferences: Window / Preferences / Maven / "Download repository index updates on startup". This option is on the main "Maven" preference page (not a child page). Just uncheck the box to prevent this from happening.

Eclipse m2e Disable repository index updates on startup

The file that this is downloading is an index of all the available dependencies available in the Maven central repository for use in Maven-enabled projects, allowing them to be easily chosen and searched against within the Eclipse UI. It is mainly a user convenience, and isn't mandatory.

ziesemer
  • 27,712
  • 8
  • 86
  • 94
  • 5
    But why it takes bloody ages while this thread runs with high priority? iostat shows it takes up to 80% of IO and CPU bandwidth and brining performance of my machine to its knees. It seems to perform java.io.RandomAccessFile.readBytes(). – divanov Jun 08 '17 at 22:01
  • 1
    Eclipse is a mine field, every feature comes with a load of bugs and caveats, the simple idea of running repository indexing on the same thread serving UI request is completely unacceptable – Pierluigi Vernetto Dec 05 '17 at 22:22
  • @PierluigiVernetto No, this does not run on the UI thread. This process can be stopped, or disabled (referencing the posted screenshot). The Maven central repository is huge - and maintaining a local index is a rather significant process. End-users can decide whether this maintenance cost is worth the benefit / user convenience for easily searching and choosing artifact IDs from the Maven central repository. (On my systems, I don't even notice a performance impact from the updates.) – ziesemer Dec 05 '17 at 23:35