Wednesday, May 5, 2010

Missing Maven dependencies when deployed in Eclipse

I created a dynamic web project in Eclipse with Maven structure. I have Maven Eclipse Plugin so I enabled it. Everything seemed fine but the app wouldn't run in Tomcat within Eclipse. It turned out that the maven dependencies did not get copied to WEB-INF/lib when I browsed to "wtpwebapps" folder where the app was deployed.

To enable it, go to Project > properties > Java EE Module Dependencies, and check "Maven Dependencies" for this project. And it worked like a charm.

No comments:

Post a Comment