tomcat7:exec-war-only

全称:

org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:exec-war-only

描述:

与 exec-war 目标相同,但不分叉打包生命周期。

属性:

  • 需要执行 Maven 项目。
  • 该目标是线程安全的,并支持并行构建。
  • 自版本2.0.

必需参数

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

可选参数

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

参数详情

accessLogValveFormat:

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

attachArtifact:

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

attachArtifactClassifier:

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

attachArtifactClassifierType:

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

buildDirectory:

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

connectorHttpProtocol:

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

enableNaming:

启动 tomcat 时启用命名
  • 类型: boolean
  • : 2.0
  • 必需:
  • 用户属性: maven.tomcat.exec.war.enableNaming
  • 默认: false

excludes:

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

extraDependencies:

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

extraResources:

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

finalName:

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

httpPort:

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

mainClass:

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

path:

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

pluginArtifacts:

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

pluginWorkDirectory:

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

serverXml:

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

skip:

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

tomcatConfigurationFilesDirectory:

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

warRunDependencies:

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