tomcat7:standalone-war-only

全称:

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

描述:

此 Mojo 将创建一个包含嵌入式 Tomcat 的可执行 war 文件,该文件也能够部署到其他地方。

属性:

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

必填参数

名称 类型 起始版本 描述
accessLogValveFormat String 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 boolean 2.1 是否将生成的 artifact 附加到构建中(如果要安装或部署它,请使用 true)
默认值为: true.
用户属性为: maven.tomcat.exec.war.attachArtifact.
attachArtifactClassifier String 2.1 用于附加/生成的 artifact 的分类器
默认值为: standalone.
用户属性为: maven.tomcat.exec.war.attachArtifactClassifier.
attachArtifactClassifierType String 2.2 用于附加/生成的 artifact 的类型
默认值为: war.
用户属性为: maven.tomcat.exec.war.attachArtifactType.
connectorHttpProtocol String 2.1 要使用的连接器协议是 HTTP/1.1 还是 org.apache.coyote.http11.Http11NioProtocol
默认值为: HTTP/1.1.
用户属性为: maven.tomcat.exec.war.connectorHttpProtocol.
enableNaming boolean 2.1 在启动 tomcat 时启用命名
默认值为: false.
用户属性为: maven.tomcat.exec.war.enableNaming.
finalName String 2.1 生成的 WAR 名称。
默认值为: ${project.artifactId}-${project.version}-standalone.war.
用户属性为: tomcat.jar.finalName.
mainClass String 2.1 用于启动独立 jar 的主类。
默认值为: org.apache.tomcat.maven.runner.Tomcat7RunnerCli.
用户属性为: maven.tomcat.exec.war.mainClass.
path String 2.1 运行 web 应用程序时使用的 webapp 上下文路径。在可执行 jar 中存储 webapp 的名称。不要使用 /
默认值为: ${project.artifactId}.
用户属性为: maven.tomcat.path.
pluginArtifacts List 2.1 (无描述)
默认值为: ${plugin.artifacts}.

可选参数

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

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

attachArtifactClassifier:

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

attachArtifactClassifierType:

用于附加/生成的 artifact 的类型
  • 类型: 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 时启用命名
  • 类型: boolean
  • 起始版本: 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 应用程序时使用的 webapp 上下文路径。在可执行 jar 中存储 webapp 的名称。不要使用 /
  • 类型: 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:

跳过执行
  • 类型: boolean
  • 起始版本: 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
  • 必需: