参考 tomcat7-maven-plugin
1)编辑pom.xml
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<url>http://127.0.0.1/manager/text</url>
<server>tomcat</server>
<username>admin</username>
<password>admin</password>
</configuration>
</plugin>
2)编辑tomcat-users.xml
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="admin" password="admin" roles="manager-gui,manager-script"/>
3)运行tomcat
4)运行mvn tomcat7:deploy