Tutorial :Why does eclipse not find the beans.xml files in a spring based Maven project


I have a maven project under eclipse with m2eclipse.

WHen running integration tests the tests fail with the mention that the spring configuration files cannot be found on the classpath, and I get a similar error from log4j.

I was under the impression that m2eclipse would add the resources directories to the classpath but apparently not.

What am I doing wrong?


sometimes m2eclipse doesn't move resources as required. I haven't really figured out why. Anyway: a simple solution is to keep a shell open and do

mvn resources:resources  

or in m2eclipse, create a new run configuration using Run Configurations -> Maven Build -> new Launch Configuration setting goals to: either process-resources (lifecycle) or resources:resources (plugin goal).

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »