Use Eclipse to create a simple MAVEN project

Source: Internet
Author: User

1. Click Maven Project, tick create a SIPMLE project (the structure is relatively complete), click Next after the creation is complete

2. Click the Project Right button to complete the information of Web. XML, or you can manually create it yourself.

3. Add the compilation environment to the Pom.xml file, right-click on the project maven--"Update project, you can see the JDK compiled version of the version has become 1.7.

4. Add project dependencies, such as Create a servlet dependency, Servlert-api.jar, add dependency, or click Pom.xml Bottom Bar, right-maven--"add dependency to add

Here, by the way, depends on the scope (which is dependent on the <scope> property)

If you import a jar package that comes with Tomcat, you need to set the dependency range for the item purpose to provided

5. Follow the above add dependency, if the discovery depends on the search, may be the search depends on the index is not open

6. Run a well-written project (if you need to take a breakpoint, you need to introduce a project source)

Use Eclipse to create a simple MAVEN project

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.