Eclipse build project "setting classpath containers" taking lot of time

Shekhar picture Shekhar · Oct 1, 2013 · Viewed 7.8k times · Source

I am facing strange problem with my Eclipse Indigo. I have one maven project and I wanted to run some JUnit test cases for some classes.

Whenever I try to run the test, eclipse hangs at 35% and text below that progress bar says that it is setting classpath containers.

This step takes long time. I have waited for more than 15 minutes also but then also tests are not running.

I was not able to exit from Eclipse because setting classpath containers step was still under progress. So I killed Eclipse process and restarted eclipse but then also same problem.

I tried to clean the project, updated maven dependencies and refreshed project but nothing helped.

Anyone knows why this problem comes in Eclipse? and how to resolve this issue?

Answer

Syed Siraj Uddin picture Syed Siraj Uddin · Oct 1, 2013
  1. You might have your maven settings.xml file in: c:\users\username\.m2\settings.xml
  2. where as your eclipse is pointing to "maven installation dir"\conf\settings.xml
  3. Change setting file path in eclipse,

window -> preferences -> maven -> usersettings -> to the one which have the right settings.xml file

This should fix the problem.

if you see the console, it might be actually trying to connect to some Jboss url to download your maven dependencies.