MavenTomcatPlugin - wendysmoak/wiki GitHub Wiki
The [http://tobago.atanion.net/site/ Tobago] page has an example of using the Maven Tomcat Plugin.
~/svn/maven/
$ svn co https://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/maven-tomcat-plugin mojo/mojo-sandbox/maven-tomcat-plugin
$ cd mojo/mojo-sandbox/maven-tomcat-plugin
$ mvn install
- Define a user in $TOMCAT_HOME/conf/tomcat-users.xml with the manager role.
- Configure that user in ~/.m2/settings.xml has a server defined
<servers>
<server>
<username>user</username>
<password>pass</password>
<id>tomcat</id>
</server>
</servers>
- Configure the plugin in your pom.xml
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<server>tomcat</server>
<update>true</update>
<!--url>change if not http://localhost:8080/manager</url-->
</configuration>
</plugin>
And then cd to a directory containing a war packaged project
$ mvn tomcat:deploy
$ mvn tomcat:undeploy
=== References ===
- Maven 1 plugin: http://www.codeczar.com/products/maven-tomcat-plugin/index.html