views:

20

answers:

1

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?

+1  A: 

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).

seanizer