Maven Tomcat Deployment

POM Config

Note the following:

  • The tomcat.manager.url is best defined inside the parent pom for your environment (rather than per project).
  • Same with the tomcat.server.
  • project.artifactId & project.version come from the POM.
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>tomcat-maven-plugin</artifactId>
        <version>1.1</version>
        <configuration>
          <url>${tomcat.manager.url}</url>
          <server>${tomcat.server}</server>
          <path>/${project.artifactId}-${project.version}</path>
        </configuration>
      </plugin>

Launch Config

To launch a Maven task that cleans and deploys the war, use this:

tomcatDeployClean-Main.png

To launch a Maven task that doesn't clean and just deploys the war, use this:

tomcatDeploy-Main.png
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License