tomcat:run-war

Runs the current project as a packaged web application using an embedded Tomcat server.

Mojo Attributes:

  • Requires a Maven 2.0 project to execute.
  • Requires dependency resolution of artifacts in scope: runtime
  • Invokes the execution of the lifecycle phase package prior to executing itself.

Required Parameters

Name Type Description
path String The webapp context path to use for the web application being run. This must always start with a forward-slash ('/').
warDirectory File The path of the exploded WAR directory to run.

Optional Parameters

Name Type Description
configurationDir String The directory to create the Tomcat server configuration under.
port int The port to run the Tomcat server on. Default value is 8080.

Parameter Details

configurationDir The directory to create the Tomcat server configuration under.
  • Type: java.lang.String
  • Required: No
  • Expression: ${project.build.directory}/tomcat

path The webapp context path to use for the web application being run. This must always start with a forward-slash ('/').
  • Type: java.lang.String
  • Required: Yes
  • Expression: /${project.build.finalName}

port The port to run the Tomcat server on.
  • Type: int
  • Required: No
  • Default: 8080

warDirectory The path of the exploded WAR directory to run.
  • Type: java.io.File
  • Required: Yes
  • Expression: ${project.build.directory}/${project.build.finalName}