tomcat:run

Full name:

org.codehaus.mojo:tomcat-maven-plugin:1.0-SNAPSHOT:run

Description:

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

Attributes:

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

Required Parameters

Name Type Since Description
path String - The webapp context path to use for the web application being run. This must always start with a forward-slash ('/').
Default value is: /${project.artifactId}.

Optional Parameters

Name Type Since Description
additionalConfigFilesDir File 1.0-alpha-2 The directory contains additional configuration Files that copied in the Tomcat conf Directory.
Default value is: ${basedir}/src/main/tomcatconf.
classesDir File - The classes directory for the web application being run.
configurationDir File - The directory to create the Tomcat server configuration under.
contextFile File - The path of the Tomcat context XML file.
port int - The port to run the Tomcat server on.
Default value is: 8080.
serverXml File 1.0-alpha-2 server.xml to use Note if you use this you must configure in this file your webapp paths.
systemProperties Map 1.0-alpha-2 List of System properties to pass to the Tomcat Server.
tomcatWebXml File 1.0-alpha-2 overriding the providing web.xml to run tomcat
warSourceDirectory File - The web resources directory for the web application being run.

Parameter Details

additionalConfigFilesDir:

The directory contains additional configuration Files that copied in the Tomcat conf Directory.
  • Type: java.io.File
  • Since: 1.0-alpha-2
  • Required: No
  • Expression: ${maven.tomcat.additionalConfigFilesDir}
  • Default: ${basedir}/src/main/tomcatconf

classesDir:

The classes directory for the web application being run.
  • Type: java.io.File
  • Required: No
  • Expression: ${project.build.outputDirectory}

configurationDir:

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

contextFile:

The path of the Tomcat context XML file.
  • Type: java.io.File
  • Required: No
  • Expression: src/main/webapp/META-INF/context.xml

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: ${maven.tomcat.path}
  • Default: /${project.artifactId}

port:

The port to run the Tomcat server on.
  • Type: int
  • Required: No
  • Expression: ${maven.tomcat.port}
  • Default: 8080

serverXml:

server.xml to use Note if you use this you must configure in this file your webapp paths.
  • Type: java.io.File
  • Since: 1.0-alpha-2
  • Required: No
  • Expression: ${maven.tomcat.serverXml}

systemProperties:

List of System properties to pass to the Tomcat Server.
  • Type: java.util.Map
  • Since: 1.0-alpha-2
  • Required: No

tomcatWebXml:

overriding the providing web.xml to run tomcat
  • Type: java.io.File
  • Since: 1.0-alpha-2
  • Required: No
  • Expression: ${maven.tomcat.webXml}

warSourceDirectory:

The web resources directory for the web application being run.
  • Type: java.io.File
  • Required: No
  • Expression: ${basedir}/src/main/webapp