Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] WAR dependency not working in m2e

Dear all,

I have a following project structure configured in Eclipse Indigo:

----------webApp (type war)

My acceptance depends on webApp, so I added the dependency:


When TYPE=WAR my junit tests fail in Eclipse. If TYPE=jar they work correctly, but my CI server (and maven in CLI, I presume) will fail saying they can't find webApp.jar.

I read something about this in, so I decided to give it a go:
- My maven-war-plugin snippet at webApp became [1]
- I added <classifier>classes</classifier> to the dependency in acceptance.

While both my CI server and "mvn test" work correctly, running an acceptance test from Eclipse fails as before, with a java.lang.ExceptionInInitializerError tracked down to " class path resource [spring-sessionFactory.xml] cannot be opened because it does not exist". This file is in webApp/src/main/resources.

Could you tell me what I am doing wrong? Do you know what is causing this and what the correct configuration should be?


Miguel Almeida


Back to the top