tomcat7:standalone-war

全名:

org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:standalone-war

描述:

这个 Mojo 将创建一个可执行的 WAR 文件,其中包含嵌入式 Tomcat,该文件也可以部署到其他地方。

属性:

  • 需要在一个 Maven 项目中执行。
  • 该目标是线程安全的,支持并行构建。
  • 自版本2.1.
  • 在执行自身之前,调用 生命周期阶段的执行package在执行自身之前。

必需参数

名称 类型 描述
accessLogValveFormat 字符串 2.1 参见 https://tomcat.ac.cn/tomcat-7.0-doc/config/valve.html
默认值为: %h %l %u %t %r %s %b %I %D.
用户属性为: maven.tomcat.exec.war.accessLogValveFormat.
attachArtifact 布尔值 2.1 是否将生成的构件附加到构建中(如果要安装或部署它,请使用 true)
默认值为: true.
用户属性为: maven.tomcat.exec.war.attachArtifact.
attachArtifactClassifier 字符串 2.1 用于附加/生成的构件的分类器
默认值为: standalone.
用户属性为: maven.tomcat.exec.war.attachArtifactClassifier.
attachArtifactClassifierType 字符串 2.2 用于附加/生成的构件的类型
默认值为: war.
用户属性为: maven.tomcat.exec.war.attachArtifactType.
connectorHttpProtocol 字符串 2.1 要使用的连接器协议 HTTP/1.1 或 org.apache.coyote.http11.Http11NioProtocol
默认值为: HTTP/1.1.
用户属性为: maven.tomcat.exec.war.connectorHttpProtocol.
enableNaming 布尔值 2.1 在启动 Tomcat 时启用命名
默认值为: false.
用户属性为: maven.tomcat.exec.war.enableNaming.
finalName 字符串 2.1 生成的 WAR 文件的名称。
默认值为: ${project.artifactId}-${project.version}-standalone.war.
用户属性为: tomcat.jar.finalName.
mainClass 字符串 2.1 用于启动独立 JAR 的主类。
默认值为: org.apache.tomcat.maven.runner.Tomcat7RunnerCli.
用户属性为: maven.tomcat.exec.war.mainClass.
path 字符串 2.1 要用于运行的 Web 应用程序的 Web 应用上下文路径。在可执行 JAR 中存储 Web 应用的名称。不要使用 /
默认值为: ${project.artifactId}.
用户属性为: maven.tomcat.path.
pluginArtifacts 列表 2.1 (无描述)
默认值为: ${plugin.artifacts}.

可选参数

名称 类型 描述
buildDirectory 文件 2.1 (无描述)
默认值为: ${project.build.directory}.
excludes 字符串数组 2.2 要从 extraDependencies 中排除的文件模式
extraDependencies 列表 2.1 要添加到独立 Tomcat JAR 中的额外依赖项列表:您的 JDBC 驱动、mail.jar 等。这些依赖项将位于根类加载器中。
extraResources 列表 2.1 要添加到独立 Tomcat JAR 中的额外资源列表:您的日志配置等
httpPort 字符串 2.2 为独立 JAR 配置一个默认的 HTTP 端口
用户属性为: maven.tomcat.exec.war.httpPort.
pluginWorkDirectory 文件 2.1 路径在buildDirectory该 mojo 可能执行临时工作的位置。
默认值为: ${project.build.directory}/tomcat7-maven-plugin-exec.
serverXml 文件 2.1 (无描述)
默认值为: src/main/tomcatconf/server.xml.
用户属性为: maven.tomcat.exec.war.serverXml.
skip 布尔值 2.2 跳过执行
默认值为: false.
用户属性为: maven.tomcat.skip.
tomcatConfigurationFilesDirectory 文件 2.1 (无描述)
默认值为: src/main/tomcatconf.
用户属性为: maven.tomcat.exec.war.tomcatConf.
warRunDependencies 列表 2.1 (无描述)

参数详情

accessLogValveFormat:

参见 https://tomcat.ac.cn/tomcat-7.0-doc/config/valve.html
  • 类型: java.lang.String
  • : 2.1
  • 必需:
  • 用户属性: maven.tomcat.exec.war.accessLogValveFormat
  • 默认: %h %l %u %t %r %s %b %I %D

attachArtifact:

是否将生成的构件附加到构建中(如果要安装或部署它,请使用 true)
  • 类型: 布尔值
  • : 2.1
  • 必需:
  • 用户属性: maven.tomcat.exec.war.attachArtifact
  • 默认: true

attachArtifactClassifier:

用于附加/生成的构件的分类器
  • 类型: java.lang.String
  • : 2.1
  • 必需:
  • 用户属性: maven.tomcat.exec.war.attachArtifactClassifier
  • 默认: standalone

attachArtifactClassifierType:

用于附加/生成的构件的类型
  • 类型: java.lang.String
  • : 2.2
  • 必需:
  • 用户属性: maven.tomcat.exec.war.attachArtifactType
  • 默认: war

buildDirectory:

(无描述)
  • 类型: java.io.File
  • : 2.1
  • 必需:
  • 默认: ${project.build.directory}

connectorHttpProtocol:

要使用的连接器协议 HTTP/1.1 或 org.apache.coyote.http11.Http11NioProtocol
  • 类型: java.lang.String
  • : 2.1
  • 必需:
  • 用户属性: maven.tomcat.exec.war.connectorHttpProtocol
  • 默认: HTTP/1.1

enableNaming:

在启动 Tomcat 时启用命名
  • 类型: 布尔值
  • : 2.1
  • 必需:
  • 用户属性: maven.tomcat.exec.war.enableNaming
  • 默认: false

excludes:

要从 extraDependencies 中排除的文件模式
  • 类型: java.lang.String[]
  • : 2.2
  • 必需:

extraDependencies:

要添加到独立 Tomcat JAR 中的额外依赖项列表:您的 JDBC 驱动、mail.jar 等。这些依赖项将位于根类加载器中。
  • 类型: java.util.List
  • : 2.1
  • 必需:

extraResources:

要添加到独立 Tomcat JAR 中的额外资源列表:您的日志配置等
  • 类型: java.util.List
  • : 2.1
  • 必需:

finalName:

生成的 WAR 文件的名称。
  • 类型: java.lang.String
  • : 2.1
  • 必需:
  • 用户属性: tomcat.jar.finalName
  • 默认: ${project.artifactId}-${project.version}-standalone.war

httpPort:

为独立 JAR 配置一个默认的 HTTP 端口
  • 类型: java.lang.String
  • : 2.2
  • 必需:
  • 用户属性: maven.tomcat.exec.war.httpPort

mainClass:

用于启动独立 JAR 的主类。
  • 类型: java.lang.String
  • : 2.1
  • 必需:
  • 用户属性: maven.tomcat.exec.war.mainClass
  • 默认: org.apache.tomcat.maven.runner.Tomcat7RunnerCli

path:

要用于运行的 Web 应用程序的 Web 应用上下文路径。在可执行 JAR 中存储 Web 应用的名称。不要使用 /
  • 类型: java.lang.String
  • : 2.1
  • 必需:
  • 用户属性: maven.tomcat.path
  • 默认: ${project.artifactId}

pluginArtifacts:

(无描述)
  • 类型: java.util.List
  • : 2.1
  • 必需:
  • 默认: ${plugin.artifacts}

pluginWorkDirectory:

路径在buildDirectory该 mojo 可能执行临时工作的位置。
  • 类型: java.io.File
  • : 2.1
  • 必需:
  • 默认: ${project.build.directory}/tomcat7-maven-plugin-exec

serverXml:

(无描述)
  • 类型: java.io.File
  • : 2.1
  • 必需:
  • 用户属性: maven.tomcat.exec.war.serverXml
  • 默认: src/main/tomcatconf/server.xml

skip:

跳过执行
  • 类型: 布尔值
  • : 2.2
  • 必需:
  • 用户属性: maven.tomcat.skip
  • 默认: false

tomcatConfigurationFilesDirectory:

(无描述)
  • 类型: java.io.File
  • : 2.1
  • 必需:
  • 用户属性: maven.tomcat.exec.war.tomcatConf
  • 默认: src/main/tomcatconf

warRunDependencies:

(无描述)
  • 类型: java.util.List
  • : 2.1
  • 必需: