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