There are many ways to deploy a MAVEN project to a server that can take advantage of jetty-maven-plugin or tomcat-maven-plugin, which is a maven knowledge point.
Typically in development, the project needs to be placed on the server with a development tool for debugging, and here's a look at creating a Maven project in Eclipse and transforming it to be deployed to Tomcat integrated in Eclipse.
1. Click File-->new-->project, select Maven Project, click Next
2 Select the Java working set where the project is located, click Next
3. Select all catalogs in the catalog, select Maven-archetype-webapp in the options below, click Next
4. Fill in the group ID Artifact ID and other options, click Finish
5. At this point, a MAVEN project has been created, but it will be further set up
Right-click on the project name, select Properties, select Project Facets in the tree on the left, and tap convert to faceted on the right.
6. On the popup window, tick the dynamic Web Module, select 2.5 for the version number, (3 with TOMCAT7 support only). Click Apply-->ok
7. After completing the previous setup, the project directory structure, a more webcontent directory, which is not compliant with the MAVEN project directory structure, we can copy the WebContent directory Meta-inf under the WebApp directory, You can then delete the WebContent directory.
8. The directory structure that you get after completing the previous step is as follows
9. Right-click on the project, New-->source Folder, named Src/main/java, for storing Java files
10 the project structure after adding the source Folder is as follows
11. Set deployment Assembly. Right click on the project, select Properties, select Deployment Assembly, in the right window will webcontent delete.
12. under Deployment Assembly Click Add, Pop Up the following window, click Folder, select Src-->main-->webapp, click Done, continue to click Add to select Java Build Path Entries, select Maven Dependencies, click Done
13. Finally, the results obtained from Deployment assembly are as follows
At this point, the MAVEN project can already be deployed to the Tomcat server, and we start the server for testing
Result is
Create MAVEN projects under Eclipse and deploy to Tomcat server (GO)