Why does Eclipse take so long to update Maven dependencies?

Even i was facing updating maven dependencies on eclipse startup and eclipse hangup. I found that my workspace directory do not have required permission(full permission). After i set those permission my issue got resolved.


Have you set Eclipse to use the local copy of Maven, rather than the built-in one? I've found that to be quicker. Also, make sure Eclipse is pointing to the local copy of your config file.


If this happens on eclipse start, it is maybe not the dependecy update of your project but the Maven repository index update (as khmarbaise mentioned in his comment).

You can disable this here: PreferencesMavenDownload repository index updates on startup

A fresh index offers you an up to date list of dependencies, e.g. in the Add Dependency dialog. But I found it will do if the index is updated manually (as needed) in the Maven Repositories View.

Update: Since Eclipse Luna the index update is now disabled by default (see Bug404417).


First check all of your dependencies including plugins and children in the dependency tree,
try to replace snapshot versions with release versions,
as snapshot versions will always look for a later update, whereas
release versions are deemed to be stable and updates are not expected for the same version number.

Secondly, assuming that you are working on a LAN, I would suggest that you install a local maven repository manager such as Nexus, and then redirect your artifact requests by setting
<mirrorOf>*</mirrorOf> in your ${user.home}/.m2/settings.xml

This will enable your downloads to be resolved quickly against a local mirror, rather than continually checking against repositories on the internet.

Tags:

Eclipse

Maven