Eclipse gets stuck at ‘Refreshing Maven Model’ endlessly. How to resolve?

Problem Statement
On my Eclipse / STS IDE, when i open a (maven) project, it often gets stuck trying to resolve dependencies with ‘refreshing maven model’ message endlessly.

Solution
Not sure why this happens. But the following resolves the problem –
1. Close your Eclipse / STS IDE.
2. Go to your workspace project directory on command line (where the pom.xml exists)
3. From command-line run: mvn dependency:resolve
This will resolve all dependencies outside of Eclipse / STS IDE.
For all projects that have large number of dependencies, this may be the thing to do!

Thats It. Now when you open your IDE, there are no dependencies to resolve, and you will not see the refreshing maven model problem.

Advertisements

3 responses

  1. Nice write up. This issue was preventing me from updating to STS 2.9.1 today so this post was useful.

  2. thx man thx a lottt 🙂

  3. This was a huge help. Thank you for posting!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: