How do I redeploy a maven web application to Tomcat?
Author: Deron Eriksson
Description: This tutorial describes how to redeploy a maven web application to Tomcat using the maven tomcat plugin.
Tutorial created using: Windows Vista || JDK 1.6.0_04 || Eclipse Web Tools Platform 2.0.1 (Eclipse 3.3.1) || Tomcat 6.0.14

Page: < 1 2

(Continued from page 1)

It should be noted that the mavenSW tomcatSW plugin does have a tomcat:redeploy goal, which I tried to use via "mvn clean package tomcat:redeploy". However, my project did not seem to get updated on Tomcat when I tried this. I had much better luck with "mvn clean tomcat:undeploy tomcat:deploy".

I created an EclipseSW External Tool Configuration so that I could click on a project and execute the maven goal by selecting the external tool configuration.

Name:mvn clean tomcat~undeploy tomcat~deploy
Working Directory:${project_loc}
Arguments:clean tomcat:undeploy tomcat:deploy

The external tool configuration is shown below.

External Tool Configuration

The pom.xml tomcat-maven-plugin reference is shown here:

pom.xml tomcat-maven-plugin reference

Page: < 1 2