Maven-tomcat-plugin can easily deploy war to local or remote tomcat, nonsense, see Code, below is a maven-tomcat-plugin configuration Pom.xml
<properties>
<!--Cargo settings-->
<cargo.container.manager.url>http://192.168.1.107/manager</ca rgo.container.manager.url>
<cargo.container.username>admin</cargo.container.username>
<cargo.container.password>123456</cargo.container.password>;
<cargo.wait>false</cargo.wait>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.0-beta-1</version>
<configuration>
<path>/runes</path>
<url>${cargo.container.manager.url}</url>
<username>${cargo.container.username}</username>
<password>${cargo.container.password}</password>
<warDirectory>${basedir}/src/main/webapp</warDirectory>
</configuration>
<executions>
<execution>
<id>tomcat-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
<!--execution>
<id>undeploy</id>
<phase>deploy</phase>
<goals>
<goal>start</goal>
</goals>
</execution-->
</executions>
</plugin>
</plugins>
</build>
Maven-tomcat-plugin through the Tomcat Manager console to deploy or undeploy applications, so configure your Tomcat-related information, including the manager URL, username and password!