views:

515

answers:

1

I get stuck with m2eclipse and maven. After adding some dependency (hibernate 3.4, but I guess that doesn't really matter) eclipse got stuck with a message like in the title. Removing the dependency from pom file didn't help either. Restarting eclipse, checking out this as a clean project from repo neither. Alwyas gets stuck on refreshing. :/

What can get (m2)eclipse stuck on refreshing the project? All ideas welcome.

A: 

Workspace resolution can really slow the dependency resolution down. Maven needs to partially calculate each project to determine the dependency hierarchy, the time taken to do this increases rapidly as the number of related projects increases. To limit this, close projects you're not working on or uncheck the option to resolve workspace projects (so Maven will resolve the dependencies from the local repository, this means you need to install the projects after each update though).

If that doesn't help, try one of these:

Are your Maven settings correct? It may be that the preferences are not pointing to your platform install so Maven is downloading the dependencies to your user home in the background - this can take ages. If so tweak those settings. Select Window->Preferences->Maven and check if it is using the embedded Maven or not.

If you are behind a proxy you will need to set the proxy settings in your preferences, though if the problem is intermittent it won't be that.

Sometimes the persisted container isn't updated, I've never been able to isolate exactly why. I've found that closing the project and reopening can prod the container back into life.

Rich Seller
The first solution helped. Resolving workspace projects was the problem.
Marcin