How Eclipse imports MAVEN projects has been a problem for a lot of program apes and beginners, and it's a pain to use eclipse without knowing how to import Maven projects. Do not worry about the small part today brings you detailed Eclipse import Maven project detailed tutorial, come together to see it.
Detailed tutorials
Recently encountered in the MAVEN management of the Spring MVC project, one of the group in the project code to throw, a face crazy (embarrassed), after reviewing some of the information has finally run the project (>_<), is hereby recorded to share with you.
In layman's terms, maven is a git-like project management tool. Spring MVC is the separation of M (Model), V (View), and C (Controller) for processing, which is more conducive to development. Below I will introduce a MAVEN project that someone else has compiled and throw to you how you should import into the integrated development environment.
Development environment: Eclipse
STEP1:
In Eclipse, select file->import; and then as shown:
Click Browse, select the folder where the project is located, and then finish to add the item.
STEP2:
Convert the imported MAVEN project into a dynamic Web Module and tick the red box in the.
STEP3: Add maven Dependencies
Continue right-click the project->properties->deployment Assembly, as shown in the red box, only four folders under SRC:
After clicking Add:
From the above 3 steps, the imported MAVEN project is converted into a Web project that can be run.
Then create a new Web server, which requires Tomcat to be installed and integrated into eclipse, so that the Web server can be created, after creating a good Web server, right-click the project we imported, select "Run as", select Run on Server is OK. Right-click the project->run on server.
Tips:
(1) Your own development environment eclipse is properly configured with Tomcat, and the version of Tomcat is best aligned with the previous version.
(2) If running the run on Server,tomcat starts the console error: "Critical: Java lang. ClassNotFound "(It's not clear, it should be), stating that your MAVEN dependencies is not added.
How Eclipse imports Maven project Eclipse import Maven Project detailed tutorial