I\'m having this weird problem making my project Maven-based. I created a new Maven project in Eclipse and enabled the Dynamic Web facets. But during runtim
First install Maven Integration For Eclipse WTP (Help->Eclipse Marketplace)
Then in your web project's pom.xml just add:
<packaging>war</packaging>
After that just right click the project, Maven -> Update Project, which should automagically add Maven Dependencies for you in the Deployment Assembly.
This should have nothing to do with eclipse and m2eclipse, and optionally for better support - m2e-wtp. Also, you don't need copy-dependencies. Here are a few possible reasons:
mvn package
(or right-click > maven > package) and obtain a war file - the <packaging>
(in the pom) must be war
provided
or test
they will not be included in the archive)If you look into your deployment and see that WEB-Inf/lib is empty of your Maven dependencies, then ensuring those Maven dependencies are in your deployment assembly is crucial as mention in the chosen answer.
However be wary of Eclipse then not refreshing everything even with a Maven update. If you clean, rebuild and redeploy and still do not see the lib folder being populated try removing and re-adding the application to the server deployments via Servers>Add and Remove.
This unclogged the system for me.