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