mvn tomcat:deploy to Tomcat 7

The mvn plug-in tomcat-maven-plugin works fine with tomcat 5.5, but it gives a 403 error when you try to deploy to a tomcat 7 instance.  Turns out tomcat 7 changed the urls for deploying, so you need to configure the plugin to use this different url.  You can do this with the following plugin configuration:

<plugin> 
   <groupId>org.codehaus.mojo</groupId> 
   <artifactId>tomcat-maven-plugin</artifactId> 
   <configuration> 
      <url>http://localhost:8080/manager/html</url> 
   </configuration> 
</plugin>

The magic is in the URL setting that now uses /manager/html, rather than the default url of just /manager.  The original source for this information: http://www.jroller.com/Fabszn/entry/tomcat_7_et_le_plugin

About these ads

2 thoughts on “mvn tomcat:deploy to Tomcat 7

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s