Skip to content

Instantly share code, notes, and snippets.

@prule
Last active December 16, 2015 18:48
Show Gist options
  • Save prule/5480080 to your computer and use it in GitHub Desktop.
Save prule/5480080 to your computer and use it in GitHub Desktop.
Maven POM configuration to deploy to tomcat - use 'mvn tomcat7:redeploy'
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<build>
...
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<!-- Tomcat 7 has a different manager path - text - than other versions -->
<url>http://REMOTE_SERVER_NAME_GOES_HERE:8080/manager/text</url>
<!-- Refer to the server settings in your ~/.m2/settings.xml -->
<server>dev-tomcat</server>
<path>/app1</path>
</configuration>
</plugin>
</plugins>
...
</build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment