tomcat:inplace

Deploy a WAR in-place to Tomcat.

Mojo Attributes:

  • Requires a Maven 2.0 project to execute.

Required Parameters

Name Type Description
charset String The URL encoding charset to use when communicating with Tomcat manager. Default value is ISO-8859-1.
mode String The deployment mode to use. This must be either war to deploy the war, context to deploy the context XML file, or both to deploy the war with the context XML file. Default value is war.
path String The webapp context path to use when communicating with Tomcat manager. This must always start with a forward-slash ('/').
update boolean Whether Tomcat should automatically undeploy webapps that already exist when deploying. Default value is false.
url URL The full URL of the Tomcat manager instance to use. Default value is http://localhost:8080/manager.
warSourceDirectory File The path of the inplace WAR directory to deploy.

Optional Parameters

Name Type Description
contextFile File The path of the Tomcat context XML file. This is not used for war deployment mode.
server String The server id in settings.xml to use when authenticating with Tomcat manager, or null to use defaults of username admin and no password.
tag String The Tomcat webapp tag name to use.

Parameter Details

charset

The URL encoding charset to use when communicating with Tomcat manager.

  • Type: java.lang.String
  • Required: Yes
  • Expression: ${maven.tomcat.charset}
  • Default: ISO-8859-1

contextFile The path of the Tomcat context XML file. This is not used for war deployment mode.
  • Type: java.io.File
  • Required: No
  • Expression: ${project.build.directory}/${project.build.finalName}/META-INF/context.xml

mode The deployment mode to use. This must be either war to deploy the war, context to deploy the context XML file, or both to deploy the war with the context XML file.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${maven.tomcat.mode}
  • Default: war

path The webapp context path to use when communicating with Tomcat manager. This must always start with a forward-slash ('/').
  • Type: java.lang.String
  • Required: Yes
  • Expression: /${project.build.finalName}

server The server id in settings.xml to use when authenticating with Tomcat manager, or null to use defaults of username admin and no password.
  • Type: java.lang.String
  • Required: No
  • Expression: ${maven.tomcat.server}

tag The Tomcat webapp tag name to use.
  • Type: java.lang.String
  • Required: No
  • Expression: ${maven.tomcat.tag}

update Whether Tomcat should automatically undeploy webapps that already exist when deploying.
  • Type: boolean
  • Required: Yes
  • Expression: ${maven.tomcat.update}
  • Default: false

url The full URL of the Tomcat manager instance to use.
  • Type: java.net.URL
  • Required: Yes
  • Expression: ${maven.tomcat.url}
  • Default: http://localhost:8080/manager

warSourceDirectory The path of the inplace WAR directory to deploy.
  • Type: java.io.File
  • Required: Yes
  • Expression: ${basedir}/src/main/webapp