Plugin Documentation

Goals available for this plugin:

GoalDescription
tomcat7:deployDeploy a WAR to Tomcat.
tomcat7:deploy-onlyDeploy a WAR to Tomcat without forking the package lifecycle.
tomcat7:exec-warCreate a self executable jar file containing all necessary Apache Tomcat classes. This allows for using just java -jar mywebapp.jar to run your webapp without needing to install a Tomcat instance. More details here.
tomcat7:exec-war-onlySame as exec-war goal without forking the package lifecycle.
tomcat7:helpDisplay help information on tomcat7-maven-plugin.
Call mvn tomcat7:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
tomcat7:redeployRedeploy a WAR in Tomcat. (Alias for the deploy goal with its update parameter set to true.)
tomcat7:redeploy-onlyRedeploy a WAR in Tomcat without forking the package lifecycle. (Alias for the deploy-only goal with its update parameter set to true.)
tomcat7:runRuns the current project as a dynamic web application using an embedded Tomcat server.
tomcat7:run-warRuns the current project as a packaged web application using an embedded Tomcat server.
tomcat7:run-war-onlySame as run-war goal without forking the package cycle.
tomcat7:shutdown

Shuts down all possibly started embedded Tomcat servers. This will be automatically done 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.

tomcat7:standalone-warThis Mojo will create an executable war file with embedded Tomcat that is also capable of being deployed elsewhere.
tomcat7:standalone-war-onlyThis Mojo will create an executable war file with embedded Tomcat that is also capable of being deployed elsewhere.
tomcat7:undeployUndeploy a WAR from Tomcat.

System Requirements

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

Maven2.0
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.apache.tomcat.maven</groupId>
          <artifactId>tomcat7-maven-plugin</artifactId>
          <version>2.1</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.1</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

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