tomcat7:standalone-war

Full name:

org.apache.tomcat.maven:tomcat7-maven-plugin:2.3-SNAPSHOT:standalone-war

Description:

This Mojo will create an executable war file with embedded Tomcat that is also capable of being deployed elsewhere.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 2.1.
  • Invokes the execution of the lifecycle phase package prior to executing itself.

Required Parameters

Name Type Since Description
accessLogValveFormat String 2.1 see http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
Default value is: %h %l %u %t %r %s %b %I %D.
User property is: maven.tomcat.exec.war.accessLogValveFormat.
attachArtifact boolean 2.1 Attach or not the generated artifact to the build (use true if you want to install or deploy it)
Default value is: true.
User property is: maven.tomcat.exec.war.attachArtifact.
attachArtifactClassifier String 2.1 the classifier to use for the attached/generated artifact
Default value is: standalone.
User property is: maven.tomcat.exec.war.attachArtifactClassifier.
attachArtifactClassifierType String 2.2 the type to use for the attached/generated artifact
Default value is: war.
User property is: maven.tomcat.exec.war.attachArtifactType.
connectorHttpProtocol String 2.1 which connector protocol to use HTTP/1.1 or org.apache.coyote.http11.Http11NioProtocol
Default value is: HTTP/1.1.
User property is: maven.tomcat.exec.war.connectorHttpProtocol.
enableNaming boolean 2.1 to enable naming when starting tomcat
Default value is: false.
User property is: maven.tomcat.exec.war.enableNaming.
enableRemoteIpValve String 2.3 see http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
Default value is: true.
User property is: maven.tomcat.exec.war.enableRemoteIpValve.
finalName String 2.1 Name of the generated WAR.
Default value is: ${project.artifactId}-${project.version}-standalone.war.
User property is: tomcat.jar.finalName.
mainClass String 2.1 Main class to use for starting the standalone jar.
Default value is: org.apache.tomcat.maven.runner.Tomcat7RunnerCli.
User property is: maven.tomcat.exec.war.mainClass.
path String 2.1 The webapp context path to use for the web application being run. The name to store webapp in exec jar. Do not use /
Default value is: ${project.artifactId}.
User property is: maven.tomcat.path.
pluginArtifacts List 2.1 (no description)
Default value is: ${plugin.artifacts}.

Optional Parameters

Name Type Since Description
buildDirectory File 2.1 (no description)
Default value is: ${project.build.directory}.
excludes String[] 2.2 File patterns to exclude from extraDependencies
extraDependencies List 2.1 list of extra dependencies to add in the standalone tomcat jar: your jdbc driver, mail.jar etc.. Those dependencies will be in root classloader.
extraResources List 2.1 list of extra resources to add in the standalone tomcat jar: your logger configuration etc
httpPort String 2.2 configure a default http port for the standalone jar
User property is: maven.tomcat.exec.war.httpPort.
pluginWorkDirectory File 2.1 Path under buildDirectory where this mojo may do temporary work.
Default value is: ${project.build.directory}/tomcat7-maven-plugin-exec.
serverXml File 2.1 (no description)
Default value is: src/main/tomcatconf/server.xml.
User property is: maven.tomcat.exec.war.serverXml.
skip boolean 2.2 Skip the execution
Default value is: false.
User property is: maven.tomcat.skip.
tomcatConfigurationFilesDirectory File 2.1 (no description)
Default value is: src/main/tomcatconf.
User property is: maven.tomcat.exec.war.tomcatConf.
warRunDependencies List 2.1 (no description)

Parameter Details

accessLogValveFormat:

see http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
  • Type: java.lang.String
  • Since: 2.1
  • Required: Yes
  • User Property: maven.tomcat.exec.war.accessLogValveFormat
  • Default: %h %l %u %t %r %s %b %I %D

attachArtifact:

Attach or not the generated artifact to the build (use true if you want to install or deploy it)
  • Type: boolean
  • Since: 2.1
  • Required: Yes
  • User Property: maven.tomcat.exec.war.attachArtifact
  • Default: true

attachArtifactClassifier:

the classifier to use for the attached/generated artifact
  • Type: java.lang.String
  • Since: 2.1
  • Required: Yes
  • User Property: maven.tomcat.exec.war.attachArtifactClassifier
  • Default: standalone

attachArtifactClassifierType:

the type to use for the attached/generated artifact
  • Type: java.lang.String
  • Since: 2.2
  • Required: Yes
  • User Property: maven.tomcat.exec.war.attachArtifactType
  • Default: war

buildDirectory:

(no description)
  • Type: java.io.File
  • Since: 2.1
  • Required: No
  • Default: ${project.build.directory}

connectorHttpProtocol:

which connector protocol to use HTTP/1.1 or org.apache.coyote.http11.Http11NioProtocol
  • Type: java.lang.String
  • Since: 2.1
  • Required: Yes
  • User Property: maven.tomcat.exec.war.connectorHttpProtocol
  • Default: HTTP/1.1

enableNaming:

to enable naming when starting tomcat
  • Type: boolean
  • Since: 2.1
  • Required: Yes
  • User Property: maven.tomcat.exec.war.enableNaming
  • Default: false

enableRemoteIpValve:

see http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
  • Type: java.lang.String
  • Since: 2.3
  • Required: Yes
  • User Property: maven.tomcat.exec.war.enableRemoteIpValve
  • Default: true

excludes:

File patterns to exclude from extraDependencies
  • Type: java.lang.String[]
  • Since: 2.2
  • Required: No

extraDependencies:

list of extra dependencies to add in the standalone tomcat jar: your jdbc driver, mail.jar etc.. Those dependencies will be in root classloader.
  • Type: java.util.List
  • Since: 2.1
  • Required: No

extraResources:

list of extra resources to add in the standalone tomcat jar: your logger configuration etc
  • Type: java.util.List
  • Since: 2.1
  • Required: No

finalName:

Name of the generated WAR.
  • Type: java.lang.String
  • Since: 2.1
  • Required: Yes
  • User Property: tomcat.jar.finalName
  • Default: ${project.artifactId}-${project.version}-standalone.war

httpPort:

configure a default http port for the standalone jar
  • Type: java.lang.String
  • Since: 2.2
  • Required: No
  • User Property: maven.tomcat.exec.war.httpPort

mainClass:

Main class to use for starting the standalone jar.
  • Type: java.lang.String
  • Since: 2.1
  • Required: Yes
  • User Property: maven.tomcat.exec.war.mainClass
  • Default: org.apache.tomcat.maven.runner.Tomcat7RunnerCli

path:

The webapp context path to use for the web application being run. The name to store webapp in exec jar. Do not use /
  • Type: java.lang.String
  • Since: 2.1
  • Required: Yes
  • User Property: maven.tomcat.path
  • Default: ${project.artifactId}

pluginArtifacts:

(no description)
  • Type: java.util.List
  • Since: 2.1
  • Required: Yes
  • Default: ${plugin.artifacts}

pluginWorkDirectory:

Path under buildDirectory where this mojo may do temporary work.
  • Type: java.io.File
  • Since: 2.1
  • Required: No
  • Default: ${project.build.directory}/tomcat7-maven-plugin-exec

serverXml:

(no description)
  • Type: java.io.File
  • Since: 2.1
  • Required: No
  • User Property: maven.tomcat.exec.war.serverXml
  • Default: src/main/tomcatconf/server.xml

skip:

Skip the execution
  • Type: boolean
  • Since: 2.2
  • Required: No
  • User Property: maven.tomcat.skip
  • Default: false

tomcatConfigurationFilesDirectory:

(no description)
  • Type: java.io.File
  • Since: 2.1
  • Required: No
  • User Property: maven.tomcat.exec.war.tomcatConf
  • Default: src/main/tomcatconf

warRunDependencies:

(no description)
  • Type: java.util.List
  • Since: 2.1
  • Required: No