Eclipse creates a Maven project

Source: Internet
Author: User

For a long time do not create MAVEN Web project, today is very unfamiliar, the collection of information finally created success, with everyone also share, but also easy to forget to use again later ...

Create a new MAVEN project (right-click New, if it doesn't exist, you can find it in other)

Click Next to start creating a MAVEN project

After clicking Next, select Maven-archetype-webapp

Click Next, enter the information, the Group ID is the package name, Artifact ID is the project name, the default value of version is OK, packet can write not write (not write will default to one)

After clicking Finish, the following screen will be displayed

Right-click the project build path

Double-click the JRE System Library to select the default JRE below

Then click Add Library and select Server Runtime (choose the appropriate tomcat)

Then apply again OK, before the mistake will not have

Careful friends will find a few things, this time we need to manually add a Folder (right click on the project New One source folder)

Don't think it's over, there's a little bit

Right click on the Project entry property, Java Build path Click on source, there are four familiar folders, double-click the first output ... Src/main/java and src/main/recources The default is Target/classes

and Src/test/java and src/test/resources default is target/test-classes (if not, please select manually)

Then click Apply, then click Project Facets to change java1.5 to java1.8 (your own JDK)

You can run the project at this time to test whether we are wearing a successful MAVEN project (Web. XML is not the same as others, but it does not affect the project run, and can be modified if necessary)

Bingo, Success!!!

Eclipse creates a 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.