Maven dependencies not visible in WEB-INF/lib

后端 未结 9 1361
南方客
南方客 2020-11-28 19:35

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

9条回答
  •  情深已故
    2020-11-28 20:22

    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:

    • you should invoke mvn package (or right-click > maven > package) and obtain a war file - the (in the pom) must be war
    • your dependencies should be with the default scope (if they are provided or test they will not be included in the archive)
    • if you are running the project as dynamic web project on a server within eclipse, then you should open the project properties (right click > properties) and select "Deployment Assembly". There click "add", select "build path entries", and choose "maven dependencies". This will instruct WTP to send the maven dependencies to the server dir.

提交回复
热议问题