How Eclipse imports Maven project Eclipse import Maven Project detailed tutorial

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.