First, configure the plug-in in Pom.xml:
<Build> <Plugins> <plugin> <groupId>Org.apache.tomcat.maven</groupId> <Artifactid>Tomcat7-maven-plugin</Artifactid> <version>2.1</version> <Configuration> <Port>8080</Port> <Path>/ssm-crud</Path> <uriencoding>UTF-8</uriencoding> <Finalname>Ssm-crud</Finalname> <Server>Tomcat7</Server> </Configuration> </plugin> </Plugins> </Build>
Configure the Maven plugin in eclipse (see another blog):
Select Pom.xml file-Right--select Run as--> Maven build ...
A few common MAVEN commands:
life Make |
|
tomcat:deploy |
Deploy a Web War package |
tomcat:reload |
Reload Web War package |
Tomcat:start |
start tomcat |
Tomcat:stop |
Stop tomcat |
Tomcat:undeploy |
Stop a war package |
tomcat:run |
start Embedded Tomcat, and run the current project |
Note here that the plug-in naming method is somewhat different, such as the launch of Tomcat, the corresponding target command is: Tomcat7:run, similarly, the other command is the same, need to change to:tomcat7:< plug-in Execution point >
MAVEN will have some strange problems when the network is unstable, the solution is to delete the re-download!
MAVEN expands--eclipse to run MAVEN projects