Recently I am working on a small project, using Maven corresponding to m2eclipse plug-in and spring MVC.
1. Create a Maven web project in eclipse
Http://limingnihao.iteye.com/blog/830409
1.1 create a Maven project and select Maven-Archetype-webapp.
1.2 configure the maven Project (I personally don't think it is necessary)
1.3 turn the project into a dynamic web project. Right-click the project, select project facets, and click convert to facted form.
1.4 configure project facets. Change the version of the dynamic Web module to 2.5. (3.0 for Java 7 ). If an error occurs, you may need to set the level of compiler compliance to 1.6 in Java compiler. (I changed to 1.5, corresponding to java5)
1.5 (important) setup and deploymentProgramSet (Web deployment Assembly)
The list here shows the path of the file to be published when a project is deployed.
1. We delete two items of test because test is used for testing and does not need to be deployed.
2. Set to publish the jar package of Maven to Lib.
Add-> JAVA build path entries-> Maven dependencies-> finish (I often forget to add a package here)
Ii. Use eclipse
1. There is a Red Cross in the project, and the markers panel prompts how to make an error. Press Ctrl + 1 to quickly find the solution.
Iii. m2eclipse
1. Add dependencies first and then writeCode