Create a Maven WebApp project with Eclipse

Source: Internet
Author: User

From http://www.cnblogs.com/candle806/p/3439469.html and http://blog.csdn.net/chuyuqing/article/details/28879477 and HTTP ://blog.csdn.net/xybelieve1990/article/details/52043127, I have integrated and optimized my own

Eclipse+maven Create WebApp project < a >

1. Open Eclipse, right-click new--"Other, if you find Maven project

2. Select Maven Project, display the window to create the MAVEN project, tick, create a simple project

3. Enter the basic information for the MAVEN project as shown in:

4. Complete the creation of the MAVEN project and generate the corresponding MAVEN project results as follows:

5, select the project, right-click Properties, go to the property page, select the Maven menu, as shown in:

6, choose Java version is 1.7 (my is 1.8), and go to uncheck the Dynamic Web module and apply (the picture here does not check JavaScript, but my eclipse does not know why not to uncheck, but it does not have to cancel it does not matter),

Then tick the dynamic Web Module again (mine is 3.1) to be able to appear futher configuration available ... Such as:

7, click further configuration available ..., as follows:

8, modify the content directory for Src/main/webapp (here WebApp is similar to Webroot), and tick the option to generate Web. XML, as follows:

9, after the determination, the WEBAPP directory structure shows:

10. You also need to set the deployment assembly (Web Deployment Assembly), right-click on the project, select Properties, select Deployment on the left Assembly

Select WebContent, remove it, test class we do not need to publish the deployment, test two directory page can be removed

Then re-specify a Web path, click Add, select Folder--〉next

Locate the WebApp directory under SRC, and then finish

Final results

11, complete the configuration as above, the final completion of the MAVEN WEBAPP project structure as shown:

Create a Maven WebApp project with Eclipse

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.