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
<packaging>(in the pom) must be
- your dependencies should be with the default scope (if they are
testthey 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.
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.
Right-click project -> Deployment Assembly: See if you have the Maven Dependencies and all others in there. If not, Right-Click project -> Maven -> Enable Workspace Resolution
(maybe then Maven -> Update Project, but then look again into "Deployment Assembly" and see what You've got.) this solved it (finally!) for me.
On Eclipse, select your Web Project -> right click -> Properties -> Deployment Assembly -> Add -> Java Build Path Entries -> Maven Dependencies
With this steps, maven libraries will be included on WEB-INF/lib when full publish.
I just did maven -> update project worked for me.
Check the Deployment Assembly property of the project. I have seen some
mvn eclipse:eclipse generated Eclipse projects sometimes have the assets being deployed to the wrong location. From what I can remember the new Deployment Assembly had some issues with earlier versions of Eclipse 3.6 (Helios).
Right-click project > Maven > Update Maven Project > OK fixed it for me
First install Maven Integration For Eclipse WTP (Help->Eclipse Marketplace)
Then in your web project's pom.xml just add:
After that just right click the project, Maven -> Update Project, which should automagically add Maven Dependencies for you in the Deployment Assembly.
- Maven dependencies not visible in WEB-INF/lib
- Manually installed maven dependencies not visible in Eclipse import
- Maven dependencies not visible under Build path in Eclipse Luna
- Maven not downloading dependencies in Eclipse
- Web resources filtering with Maven war plugin does not work in Eclipse with m2e
- Eclipse WTP not publishing Maven dependencies
- Eclipse Maven web application - can not run on server anymore
- Maven dependencies not deployed on Eclipse Tomcat instance
- Eclipse does not recognize existing resolved Maven dependencies
- Maven - Transitive dependencies are not resolved for artifact deployed on Artifactory
- Maven 3 dependencies from parent POM not available to children in eclipse
- Eclipse:Run on server option not visible for maven project
- Maven dependencies not being added to WEB-INF/lib
- A Java web project created with Maven is not recognized as such by Eclipse
- Eclipse - Maven - Dependencies not getting automatically reflected
- Eclipse - cant add jar to build path. jar is inside the lib folder of project, but not visible
- Maven not updating/downloading dependencies
- Eclipse does not show source code of maven dependencies in debug view
- Eclipse Gradle dependencies are not updated in Web App Libraries
- Why and when is Eclipse putting Maven dependencies in the CLASSPATH and not in the MODULEPATH?
- Syncing web project dependencies maven -> eclipse
- Maven dependencies not accessible in Java
- Maven not downloading jars for dependencies
- Maven build fails with error message Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved
- Maven Java web project not recognised when importing into Eclipse
- during maven build [mvn install] dependencies not getting downloaded from repository
- Classes, generated with Maven and Dagger, are not visible to ADT in Eclipse
- How to refer jars in Maven which are present in the project's lib folder and not in repository?
- Maven - installed to local repo, not getting transitive dependencies
- Eclipse maven build does not install dependencies
More Query from same tag
- What's the best way of debug with Eclipse a SBT-based webapp
- django createsuperuser not working
- Setting up SVN in Eclipse
- Importing example projects using Android into Eclipse Helios fails
- Weird error in Eclipse with Android
- How to set focus EditText After validation active in Android?
- Problem with ADSafe and JSLint
- tomee won't start from within eclipse
- Impossible to install jshint-eclipse plugin
- Eclipse crashes when creating a new android project
- How to find the sum in a multidimensional array?
- Variable project_loc contains no value
- quandl get cmd vs. ecplipse
- How to set a Java project facet to 12?
- Auto generate constructor with default initialization of variables
- Eclipse plugin development: Deliver tools (e.g. compiler)
- Eclipse Dynamic Web Application putting jar files in WEB-INF/lib and Java Build Path
- SAXParserFactory.newInstance() cannot be resolved to a type
- Configure Eclipse to Beep when done (Python, Linux)
- Eclipse Luna (4.4.0): WindowBuilder installed but not appearing to use in "Select Wizard" menu
- From Object-Type to its constructing MethodDeclarion in Eclipse JDT?
- Error : No resource found that matches the given name (at 'icon' with value '@drawable/icon')!
- Local maven package is not in import list
- Java Security Exception Invalid SHA1 Jar file
- Java, JSP, Eclipse - The server encountered an unexpected condition that prevented it from fulfilling the request
- Why am I getting a FATAL_ERROR when I try to debug a program?
- Can the Maven Eclipse Plugin use M2_REPO classpath variable for source path?
- mp3transform | Playing (mp3's) on a Separate Thread
- datanucleus enhancer & javaw: "the parameter is incorrect"
- Print characters from a string (first character; then first and second; then first, second, and third)