全名:
org.apache.maven.plugins:maven-invoker-plugin:1.6:run
说明:
属性:
姓名 | 类型 | 自从 | 描述 |
---|---|---|---|
addTestClassPath | 布尔值 | 1.2 | 一个标志,被测项目的测试类路径是否应该包含在构建前/构建后脚本的类路径中。如果设置为false,则脚本解释器的类路径仅包含Maven Invoker 插件的运行时依赖项。如果设置为
true,项目的测试类路径将被添加到解释器类路径中。除其他外,此功能允许脚本从项目的测试源访问实用程序类。 默认值为:false。 |
克隆所有文件 | 布尔值 | 1.2 | 将 IT 项目从参数 projectsDirectory 指定的目录复制到 cloneProjectsTo 指定的目录(例如.svn、
CVS、*~等)时,通常会排除某些文件。将此参数设置为
true将导致将所有文件复制到 cloneProjectsTo 目录。 默认值为:false。 |
克隆清洁 | 布尔值 | 1.6 | 确保cloneProjectsTo目录没有被早期调用程序运行的文件污染。 默认值为:false。 |
克隆项目到 | 文件 | 1.1 | 在执行之前应将项目克隆到的目录。如果未指定,则每个集成测试都将在找到相应 IT POM 的目录中运行。在这种情况下,您很可能希望将 SCM 配置为忽略测试基本目录中的target和
build.log。 |
调试 | 布尔值 | 1.0 | 是否在构建输出中显示调试语句。 默认值为:false。 |
禁用报告 | 布尔值 | 1.4 | 禁用生成报告生成的标志。 默认值为:false。 |
编码 | 细绳 | 1.2 | 构建前/构建后脚本的文件编码以及目标和配置文件的列表文件。 默认值为:${project.build.sourceEncoding}。 |
过滤器属性 | 地图 | 1.3 | 将用于过滤 POM 和目标文件中的令牌的附加属性列表。 |
目标 | 列表 | 1.0 | 每个项目要执行的目标列表。默认值为:
包。 |
目标文件 | 细绳 | 1.0 | 已弃用。从 1.2 版开始,应该使用参数
invokerPropertiesFile指定的属性文件中的键invoker.goals 。默认值为:goals.txt。 |
忽略失败 | 布尔值 | 1.3 | 控制子构建失败是否也应该使主构建失败的标志。如果设置为true,即使一个或多个子构建失败,主构建也会继续。 默认值为:false。 |
插值属性 | 特性 | 1.1 | 已弃用。从 1.3 版开始,
应改为使用参数filterProperties 。 |
调用者属性文件 | 细绳 | 1.2 | 包含用于指定单个 Maven 调用设置的属性的可选项目特定文件的名称。文件中存在的任何属性都将覆盖插件配置中的相应设置。属性的值被过滤,并且可以使用像
${project.version}这样的表达式来引用来自参数filterProperties的项目属性或值。下面的代码片段描述了支持的属性:
# A comma or space separated list of goals/phases to execute, may # specify an empty list to execute the default goal of the IT project invoker.goals = clean install # Optionally, a list of goals to run during further invocations of Maven invoker.goals.2 = ${project.groupId}:${project.artifactId}:${project.version}:run # A comma or space separated list of profiles to activate invoker.profiles = its,jdk15 # The path to an alternative POM or base directory to invoke Maven on, defaults to the # project that was originally specified in the plugin configuration # Since plugin version 1.4 invoker.project = sub-module # The value for the environment variable MAVEN_OPTS invoker.mavenOpts = -Dfile.encoding=UTF-16 -Xms32m -Xmx256m # Possible values are "fail-fast" (default), "fail-at-end" and "fail-never" invoker.failureBehavior = fail-never # The expected result of the build, possible values are "success" (default) and "failure" invoker.buildResult = failure # A boolean value controlling the aggregator mode of Maven, defaults to "false" invoker.nonRecursive = true # A boolean value controlling the network behavior of Maven, defaults to "false" # Since plugin version 1.4 invoker.offline = true # The path to the properties file from which to load system properties, defaults to the # filename given by the plugin parameter testPropertiesFile # Since plugin version 1.4 invoker.systemPropertiesFile = test.properties # An optional human friendly name for this build job to be included in the build reports. # Since plugin version 1.4 invoker.name = Test Build 01 # An optional description for this build job to be included in the build reports. # Since plugin version 1.4 invoker.description = Checks the support for build reports. # A comma separated list of JRE versions on which this build job should be run. # Since plugin version 1.4 invoker.java.version = 1.4+, !1.4.1, 1.7- # A comma separated list of OS families on which this build job should be run. # Since plugin version 1.4 invoker.os.family = !windows, unix, mac # A comma separated list of Maven versions on which this build should be run. # Since plugin version 1.5 invoker.maven.version = 2.0.10+, !2.1.0, !2.2.0 默认值为:invoker.properties。 |
调用者测试 | 细绳 | 1.1 | 要运行的项目名称的逗号分隔列表。指定此参数以按文件名运行单个测试,覆盖
setupIncludes、pomIncludes和
pomExcludes参数。您在此处指定的每个模式都将用于创建格式
为 ${projectsDirectory}/ pattern的包含模式,因此您只需键入-Dinvoker.test=FirstTest,SecondTest即可在${projectsDirectory}/FirstTest和
${projectsDirectory}中运行构建/第二次测试。 |
主页 | 文件 | 1.3 | 用于分叉 Maven 调用的JAVA_HOME环境变量。默认为当前 Java 主目录。 |
本地存储库路径 | 文件 | 1.0 | 用于缓存工件的本地存储库。强烈建议指定一个独立存储库的路径,例如
${project.build.directory}/it-repo。否则,将使用您的普通本地存储库,可能会被损坏的工件弄脏。 默认值为:${settings.localRepository}。 |
行家之家 | 文件 | 1.3 | 用于分叉构建的 Maven 安装的主目录。默认为当前的 Maven 安装。 |
mavenOpts | 细绳 | 1.2 | 调用 Maven 时使用的MAVEN_OPTS环境变量。可以使用invokerPropertiesFile为单个集成测试覆盖此值。 |
合并用户设置 | 布尔值 | 1.6 | 如果启用并且您为执行配置了设置文件,它将与您的用户设置合并。 默认值为:false。 |
无日志 | 布尔值 | 1.0 | 禁止将日志记录到build.log文件。 默认值为:false。 |
并行线程 | 整数 | 1.6 | 并行运行测试的线程数。这将是并行的 Maven 分叉进程的数量。 默认值为:1。 |
绒球 | 文件 | 1.0 | 要构建的单个 POM,跳过任何扫描参数和行为。 |
pom不包括 | 列表 | 1.0 | 排除用于搜索集成测试目录的模式。此参数旨在从 POM 中设置。默认情况下,不排除任何 POM 文件。为了方便使用
*之类的包含模式,参数settingsFile指定的自定义设置文件
将始终被自动排除。 |
pom包括 | 列表 | 1.0 | 包括用于在集成测试目录中搜索项目的模式。此参数旨在从 POM 中设置。如果未设置此参数,插件将搜索
位于projectsDirectory下一个目录的所有pom.xml文件
(即*/pom.xml)。
从 1.3 版开始,这些模式也可以匹配单纯的目录。例如,包含模式*将在projectsDirectory
的所有直接子目录上运行 Maven 构建
,无论它们是否包含
pom.xml。这允许执行需要/不应该依赖于 POM 存在的构建。 |
postBuildHookScript | 细绳 | 1.0 | 执行构建后要运行的清理/验证挂钩脚本的相对路径。该脚本可以使用 BeanShell 或 Groovy(从 1.3 开始)编写。如果省略文件扩展名(例如verify),插件会通过尝试众所周知的扩展名.bsh和
.groovy来搜索文件。如果此脚本存在于特定项目但返回任何不同于
true的非空值或引发异常,则相应的构建将被标记为失败。 默认值为:postbuild。 |
preBuildHookScript | 细绳 | 1.0 | 在执行构建之前运行的预构建钩子脚本的相对路径。该脚本可以使用 BeanShell 或 Groovy(从 1.3 开始)编写。如果省略文件扩展名(例如
prebuild),插件会通过尝试众所周知的扩展名.bsh和
.groovy来搜索文件。如果此脚本存在于特定项目但返回任何不同于
true的非空值或引发异常,则相应的构建将被标记为失败。在这种情况下,既不会调用 Maven 也不会调用构建后挂钩脚本。 默认值为:预构建。 |
简介 | 列表 | 1.1 | 要在构建中显式触发的配置文件标识符列表。 |
配置文件文件 | 细绳 | 1.1 | 已弃用。从 1.2 版开始,应该使用参数
invokerPropertiesFile指定的属性文件中的键invoker.profiles 。默认值为:profiles.txt。 |
项目目录 | 文件 | 1.0 | 搜索集成测试的目录。 默认值为:${basedir}/src/it/。 |
特性 | 地图 | 1.1 | 通过 -D 参数在每个项目的命令行上传递的一组通用属性。 |
报告目录 | 文件 | 1.4 | 写入所有构建报告的基本目录。集成测试的每次执行都会生成一个 XML 文件,其中包含有关特定构建作业成功或失败的信息。生成的 XML 文件的格式记录在给定的构建作业
参考中。 默认值为:${project.build.directory}/invoker-reports。 |
选择器脚本 | 细绳 | 1.5 | 选择器脚本的相对路径,以决定是否应该执行构建。该脚本可以使用 BeanShell 或 Groovy 编写。如果省略文件扩展名(例如
selector),插件会通过尝试众所周知的扩展名.bsh和
.groovy来搜索文件。如果此脚本存在于特定项目但返回任何不同于
true的非空值,则相应的构建将被标记为已跳过。在这种情况下,不会调用构建前挂钩脚本、Maven 和构建后挂钩脚本。如果此脚本抛出异常,则相应的构建被标记为错误,并且不会调用构建前的钩子脚本,Maven 而不是构建后的钩子脚本。 默认值为:选择器。 |
设置文件 | 文件 | 1.2 | 用于所有 IT 的 Maven 调用的备用settings.xml的路径。请注意,此设置文件的
<localRepository>元素始终被忽略,即参数
localRepositoryPath给出的路径占主导地位。 |
设置包括 | 列表 | 1.3 | 包括用于在项目目录中搜索需要在其他项目之前运行的项目的模式。此参数允许声明执行设置任务的项目,例如将实用程序工件安装到本地存储库中。与这些模式匹配的项目被隐式地排除在普通项目的扫描之外。此外,由参数
pomExcludes定义的排除项也适用于设置项目。默认值为:setup*/pom.xml。 |
显示错误 | 布尔值 | 1.0 | 是否在构建输出中显示错误。 默认值为:false。 |
显示版本 | 布尔值 | 1.4 | 启用用于运行其的显示 mvn 版本的标志(cli 选项:-V,--show-version) 默认值为:false。 |
跳过调用 | 布尔值 | 1.1 | 用于禁止某些调用的标志。这在使用配置文件定制构建时很有用。 默认值为:false。 |
流日志 | 布尔值 | 1.0 | 用于确定是否应将构建日志输出到普通 mojo 日志的标志。 默认值为:false。 |
抑制摘要 | 布尔值 | 1.0 | 用于禁止通知成功和失败的摘要输出的标志。如果设置为true,构建成功或失败的唯一指示将是它对主构建的影响(如果失败,主构建也应该失败)。如果
启用了streamLogs,子构建摘要也将提供指示。 默认值为:false。 |
测试属性 | 特性 | 1.0 | 已弃用。从 1.1 版开始,请改用properties参数。 |
测试属性文件 | 细绳 | 1.0 | 为测试定义 CLI 属性的属性文件的位置。 默认值为:test.properties。 |
克隆清洁:
调试:
禁用报告:
编码:
目标:
目标文件:
忽略失败:
插值属性:
# A comma or space separated list of goals/phases to execute, may # specify an empty list to execute the default goal of the IT project invoker.goals = clean install # Optionally, a list of goals to run during further invocations of Maven invoker.goals.2 = ${project.groupId}:${project.artifactId}:${project.version}:run # A comma or space separated list of profiles to activate invoker.profiles = its,jdk15 # The path to an alternative POM or base directory to invoke Maven on, defaults to the # project that was originally specified in the plugin configuration # Since plugin version 1.4 invoker.project = sub-module # The value for the environment variable MAVEN_OPTS invoker.mavenOpts = -Dfile.encoding=UTF-16 -Xms32m -Xmx256m # Possible values are "fail-fast" (default), "fail-at-end" and "fail-never" invoker.failureBehavior = fail-never # The expected result of the build, possible values are "success" (default) and "failure" invoker.buildResult = failure # A boolean value controlling the aggregator mode of Maven, defaults to "false" invoker.nonRecursive = true # A boolean value controlling the network behavior of Maven, defaults to "false" # Since plugin version 1.4 invoker.offline = true # The path to the properties file from which to load system properties, defaults to the # filename given by the plugin parameter testPropertiesFile # Since plugin version 1.4 invoker.systemPropertiesFile = test.properties # An optional human friendly name for this build job to be included in the build reports. # Since plugin version 1.4 invoker.name = Test Build 01 # An optional description for this build job to be included in the build reports. # Since plugin version 1.4 invoker.description = Checks the support for build reports. # A comma separated list of JRE versions on which this build job should be run. # Since plugin version 1.4 invoker.java.version = 1.4+, !1.4.1, 1.7- # A comma separated list of OS families on which this build job should be run. # Since plugin version 1.4 invoker.os.family = !windows, unix, mac # A comma separated list of Maven versions on which this build should be run. # Since plugin version 1.5 invoker.maven.version = 2.0.10+, !2.1.0, !2.2.0
主页:
无日志:
并行线程:
pom:
简介:
项目目录:
属性:
报告目录:
设置文件:
设置包括:
显示错误:
显示版本:
跳过调用:
流日志:
抑制总结:
测试属性: