Plugin Documentation

Goals available for this plugin:

GoalDescription
tomcat:deployDeploy a WAR to Tomcat.
tomcat:deploy-onlyDeploy a WAR to Tomcat witjout forking the package lifecycle
tomcat:explodedDeploy an exploded WAR to Tomcat.
tomcat:helpDisplay help information on tomcat-maven-plugin.
Call
 mvn tomcat:help -Ddetail=true -Dgoal=<goal-name>
to display parameter details.
tomcat:infoLists information about the Tomcat version, OS, and JVM properties.
tomcat:inplaceDeploy a WAR in-place to Tomcat.
tomcat:listLists all the currently deployed web applications in Tomcat.
tomcat:redeployRedeploy a WAR in Tomcat. Deploy with forcing update flag to true
tomcat:reloadReload a WAR in Tomcat.
tomcat:resourcesLists JNDI resources in Tomcat.
tomcat:rolesLists security roles in Tomcat.
tomcat:runRuns the current project as a dynamic web application using an embedded Tomcat server.
tomcat:run-warRuns the current project as a packaged web application using an embedded Tomcat server.
tomcat:run-war-onlyRuns the current project as a packaged web application using an embedded Tomcat server without forking the package cycle.
tomcat:sessionsLists session information for a WAR in Tomcat.
tomcat:shutdown

Shuts down all possibly started embedded tomcat servers. This will be automatically down through a shutdown hook or you may call this Mojo to shut them down explictly.

By default the shutdown goal is not bound to any phase. For integration tests you might want to bind it to post-integration-test.

tomcat:startStart a WAR in Tomcat.
tomcat:stopStop a WAR in Tomcat.
tomcat:undeployUndeploy a WAR from Tomcat.

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven2.0.8
JDK1.5
MemoryNo minimum requirement.
Disk SpaceNo minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>tomcat-maven-plugin</artifactId>
          <version>1.2-SNAPSHOT</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>tomcat-maven-plugin</artifactId>
        <version>1.2-SNAPSHOT</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"