invoker:integration-test

Full name:

org.apache.maven.plugins:maven-invoker-plugin:3.5.0:integration-test

Description:

Searches for integration test Maven projects, and executes each, collecting a log in the project directory, will never fail the build, designed to be used in conjunction with the verify mojo.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 1.4.
  • Binds by default to the lifecycle phase: integration-test.

Optional Parameters

Name Type Since Description
<addTestClassPath> boolean 1.2 A flag whether the test class path of the project under test should be included in the class path of the pre-/post-build scripts. If set to false, the class path of script interpreter consists only of the runtime dependencies of the Maven Invoker Plugin. If set the true, the project's test class path will be prepended to the interpreter class path. Among others, this feature allows the scripts to access utility classes from the test sources of your project.
Default value is: false.
User property is: invoker.addTestClassPath.
<cloneAllFiles> boolean 1.2 Some files are normally excluded when copying the IT projects from the directory specified by the parameter projectsDirectory to the directory given by cloneProjectsTo (e.g. .svn, CVS, *~, etc: see reference for full list). Setting this parameter to true will cause all files to be copied to the cloneProjectsTo directory.
Default value is: false.
<cloneClean> boolean 1.6 Ensure the cloneProjectsTo directory is not polluted with files from earlier invoker runs.
Default value is: true.
<cloneProjectsTo> File 1.1 Directory to which projects should be cloned prior to execution. If set to null, each integration test will be run in the directory in which the corresponding IT POM was found. In this case, you most likely want to configure your SCM to ignore target and build.log in the test's base directory. (Exception when project using invoker plugin is of maven-plugin packaging: In such case IT projects will be cloned to and executed in target/its by default.)
User property is: invoker.cloneProjectsTo.
<debug> boolean 1.0 Whether to show debug statements in the build output.
Default value is: false.
User property is: invoker.debug.
<disableReports> boolean 1.4 A flag to disable the generation of build reports.
Default value is: false.
User property is: invoker.disableReports.
<encoding> String 1.2 The file encoding for the pre-/post-build scripts and the list files for goals and profiles.
Default value is: ${project.build.sourceEncoding}.
User property is: encoding.
<environmentVariables> Map<String,String> 1.8 Additional environment variables to set on the command line.
<filterProperties> Map<String,String> 1.3 A list of additional properties which will be used to filter tokens in POMs and goal files.
<goals> List<String> 1.0 The list of goals to execute on each project. Default value is: package.
<invokerPropertiesFile> String 1.2 The name of an optional project-specific file that contains properties used to specify settings for an individual Maven invocation. Any property present in the file will override the corresponding setting from the plugin configuration. The values of the properties are filtered and may use expressions like ${project.version} to reference project properties or values from the parameter filterProperties.

As of 3.2.0 it is possible to put this folder in any of the ancestor folders, where properties will be inherited. This way you can provide a single properties file for a group of projects

The snippet below describes the supported 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.
# Environment variables used by maven plugins can be added here
invoker.goals = clean install -Dplugin.variable=value

# Or you can give things like this if you need.
invoker.goals = -T2 clean verify

# 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
# can be indexed
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
# can be indexed
invoker.project = sub-module

# The maven executable can either be a file relative to ${maven.home}/bin/, test project workspace
# or an absolute file.
# Since plugin version 3.3.0
# can be indexed
invoker.mavenExecutable = mvnw

# The value for the environment variable MAVEN_OPTS
# can be indexed
invoker.mavenOpts = -Dfile.encoding=UTF-16 -Xms32m -Xmx256m

# Possible values are "fail-fast" (default), "fail-at-end" and "fail-never"
# can be indexed
invoker.failureBehavior = fail-never

# The expected result of the build, possible values are "success" (default) and "failure"
# can be indexed
invoker.buildResult = failure

# A boolean value controlling the aggregator mode of Maven, defaults to "false"

# can be indexed
invoker.nonRecursive = true

# A boolean value controlling the network behavior of Maven, defaults to "false"
# Since plugin version 1.4
# can be indexed
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
# can be indexed
invoker.systemPropertiesFile = test.properties

# An optional human friendly name and description for this build job.
# Both name and description have to be set to be included in the build reports.
# Since plugin version 1.4
invoker.name = Test Build 01
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

# A mapping for toolchain to ensure it exists
# Since plugin version 3.2.0
invoker.toolchain.<type>.<provides> = value
invoker.toolchain.jdk.version = 11

# For java.version, maven.version, os.family and toolchain it is possible to define multiple selectors.
# If one of the indexed selectors matches, the test is executed.
# With the invoker.x.y equivalents you can specify global matchers.
selector.1.java.version = 1.8+
selector.1.maven.version = 3.2.5+
selector.1.os.family = !windows
selector.2.maven.version = 3.0+
selector.3.java.version = 9+

# A boolean value controlling the debug logging level of Maven, , defaults to "false"
# Since plugin version 1.8
# can be indexed
invoker.debug = true

# Whether to execute Maven in quiet mode
# Since plugin version 3.3.0
# can be indexed
invoker.quiet = true

The execution timeout in seconds.
# Since plugin version 3.0.2
# can be indexed
invoker.timeoutInSeconds = 5

# Path to an alternate settings.xml to use for Maven invocation with this IT.
# Since plugin version 3.0.1
# can be indexed
invoker.settingsFile = ../

# An integer value to control run order of projects. sorted in the descending order of the ordinal.
# In other words, the BuildJobs with the highest numbers will be executed first
# Default value is 0 (zero)
# Since plugin version 3.2.1
invoker.ordinal = 3

# The additional value for the environment variable.
# Since plugin version 3.2.2
invoker.environmentVariables.<variableName> = variableValue
invoker.environmentVariables.MY_ENV_NAME = myEnvValue

# A boolean value indicating a check for missing releases and updated snapshots on remote repositories to be done
# Passed to the invoker. Same as passing -U, --update-snapshots flag on the command line
# Since plugin version 3.4.0
invoker.updateSnapshots = true


Default value is: invoker.properties.
User property is: invoker.invokerPropertiesFile.
<invokerTest> String 1.1 (exclusion since 1.8) A comma separated list of projectname patterns to run. Specify this parameter to run individual tests by file name, overriding the setupIncludes, pomIncludes and pomExcludes parameters. Each pattern you specify here will be used to create an include/exclude pattern formatted like ${projectsDirectory}/pattern. To exclude a test, prefix the pattern with a '!'. So you can just type -Dinvoker.test=SimpleTest,Comp*Test,!Compare* to run builds in ${projectsDirectory}/SimpleTest and ${projectsDirectory}/ComplexTest, but not ${projectsDirectory}/CompareTest
User property is: invoker.test.
<javaHome> File 1.3 The JAVA_HOME environment variable to use for forked Maven invocations. Defaults to the current Java home directory.
User property is: invoker.javaHome.
<junitPackageName> String 3.1.2 The package name use in junit report
Default value is: maven.invoker.it.
User property is: invoker.junitPackageName.
<localRepositoryPath> File 1.0 The local repository for caching artifacts. It is strongly recommended to specify a path to an isolated repository like ${project.build.directory}/it-repo. Otherwise, your ordinary local repository will be used, potentially soiling it with broken artifacts.
Default value is: ${settings.localRepository}.
User property is: invoker.localRepositoryPath.
<logDirectory> File 3.2.0 By default a build.log is created in the root of the project. By setting this folder files are written to a different folder, respecting the structure of the projectsDirectory.
<mavenExecutable> File 1.8 mavenExecutable can either be a file relative to ${maven.home}/bin/, test project workspace or an absolute file.
User property is: invoker.mavenExecutable.
<mavenHome> File 1.3 The home directory of the Maven installation to use for the forked builds. Defaults to the current Maven installation.
User property is: invoker.mavenHome.
<mavenOpts> String 1.2 The MAVEN_OPTS environment variable to use when invoking Maven. This value can be overridden for individual integration tests by using invokerPropertiesFile.
User property is: invoker.mavenOpts.
<mergeUserSettings> boolean 1.6 If enable and if you have a settings file configured for the execution, it will be merged with your user settings.
Default value is: false.
User property is: invoker.mergeUserSettings.
<noLog> boolean 1.0 Suppress logging to the build.log file.
Default value is: false.
User property is: invoker.noLog.
<parallelThreads> String 1.6

Number of threads for running tests in parallel. This will be the number of maven forked process in parallel. When terminated with "C", the number part is multiplied by the number of processors (cores) available to the Java virtual machine. Floating point value are only accepted together with "C".

Example values: "1.5C", "4"


Default value is: 1.
User property is: invoker.parallelThreads.
<pom> File 1.0 A single POM to build, skipping any scanning parameters and behavior.
User property is: invoker.pom.
<pomExcludes> List<String> 1.0 Exclude patterns for searching the integration test directory. This parameter is meant to be set from the POM. By default, no POM files are excluded. For the convenience of using an include pattern like *, the custom settings file specified by the parameter settingsFile will always be excluded automatically.
<pomIncludes> List<String> 1.0 Include patterns for searching the integration test directory for projects. This parameter is meant to be set from the POM. If this parameter is not set, the plugin will search for all pom.xml files one directory below projectsDirectory (i.e. */pom.xml).

Starting with version 1.3, mere directories can also be matched by these patterns. For example, the include pattern * will run Maven builds on all immediate sub directories of projectsDirectory, regardless if they contain a pom.xml. This allows to perform builds that need/should not depend on the existence of a POM.
<postBuildHookScript> String 1.0 Relative path of a cleanup/verification hook script to run after executing the build. This script may be written with either BeanShell or Groovy (since 1.3). If the file extension is omitted (e.g. verify), the plugin searches for the file by trying out the well-known extensions .bsh and .groovy. If this script exists for a particular project but returns any non-null value different from true or throws an exception, the corresponding build is flagged as a failure.
Default value is: postbuild.
User property is: invoker.postBuildHookScript.
<preBuildHookScript> String 1.0 Relative path of a pre-build hook script to run prior to executing the build. This script may be written with either BeanShell or Groovy (since 1.3). If the file extension is omitted (e.g. prebuild), the plugin searches for the file by trying out the well-known extensions .bsh and .groovy. If this script exists for a particular project but returns any non-null value different from true or throws an exception, the corresponding build is flagged as a failure. In this case, neither Maven nor the post-build hook script will be invoked.
Default value is: prebuild.
User property is: invoker.preBuildHookScript.
<profiles> List<String> 1.1 List of profile identifiers to explicitly trigger in the build.
<projectsDirectory> File 1.0 Directory to search for integration tests.
Default value is: ${basedir}/src/it/.
User property is: invoker.projectsDirectory.
<properties> Map<String,String> 1.1 Common set of properties to pass in on each project's command line, via -D parameters.
<quiet> boolean 3.3.0 Whether to execute Maven in quiet mode.
Default value is: false.
User property is: invoker.quiet.
<reportsDirectory> File 1.4 Base directory where all build reports are written to. Every execution of an integration test will produce an XML file which contains the information about success or failure of that particular build job. The format of the resulting XML file is documented in the given build-job reference.
Default value is: ${project.build.directory}/invoker-reports.
User property is: invoker.reportsDirectory.
<scriptVariables> Map<String,String> 1.9 Additional variables for use in the hook scripts.
<selectorScript> String 1.5 Relative path of a selector script to run prior in order to decide if the build should be executed. This script may be written with either BeanShell or Groovy. If the file extension is omitted (e.g. selector), the plugin searches for the file by trying out the well-known extensions .bsh and .groovy. If this script exists for a particular project but returns any non-null value different from true, the corresponding build is flagged as skipped. In this case, none of the pre-build hook script, Maven nor the post-build hook script will be invoked. If this script throws an exception, the corresponding build is flagged as in error, and none of the pre-build hook script, Maven not the post-build hook script will be invoked.
Default value is: selector.
User property is: invoker.selectorScript.
<settingsFile> File 1.2 Path to an alternate settings.xml to use for Maven invocation with all ITs. Note that the <localRepository> element of this settings file is always ignored, i.e. the path given by the parameter localRepositoryPath is dominant.
User property is: invoker.settingsFile.
<setupIncludes> List<String> 1.3 Include patterns for searching the projects directory for projects that need to be run before the other projects. This parameter allows to declare projects that perform setup tasks like installing utility artifacts into the local repository. Projects matched by these patterns are implicitly excluded from the scan for ordinary projects. Also, the exclusions defined by the parameter pomExcludes apply to the setup projects, too. Default value is: setup*/pom.xml.
<showErrors> boolean 1.0 Whether to show errors in the build output.
Default value is: false.
User property is: invoker.showErrors.
<showVersion> boolean 1.4 flag to enable show mvn version used for running its (cli option : -V,--show-version )
Default value is: false.
User property is: invoker.showVersion.
<skipInvocation> boolean 1.1 Flag used to suppress certain invocations. This is useful in tailoring the build using profiles.
Default value is: false.
User property is: invoker.skip.
<streamLogs> boolean 1.0 Flag used to determine whether the build logs should be output to the normal mojo log.
Default value is: false.
User property is: invoker.streamLogs.
<suppressSummaries> boolean 1.0 Flag used to suppress the summary output notifying of successes and failures. If set to true, the only indication of the build's success or failure will be the effect it has on the main build (if it fails, the main build should fail as well). If streamLogs is enabled, the sub-build summary will also provide an indication.
Default value is: false.
<testPropertiesFile> String 1.0 Location of a properties file that defines CLI properties for the test.
Default value is: test.properties.
User property is: invoker.testPropertiesFile.
<timeoutInSeconds> int 3.0.2 (no description)
Default value is: 0.
User property is: invoker.timeoutInSeconds.
<updateOnly> boolean 3.2.2 Only invoke maven projects if their sources have been modified since they were last built. Only works in conjunction with cloneProjectsTo.
Default value is: false.
User property is: invoker.updateOnly.
<updateSnapshots> boolean 3.4.0 Force a check for missing releases and updated snapshots on remote repositories. This is passed to the invoked maven projects (it is the same as if you were to use the -U, --update-snapshots flag on the command line).
Default value is: false.
User property is: invoker.updateSnapshots.
<writeJunitReport> boolean 3.1.2 Write test result in junit format.
Default value is: false.
User property is: invoker.writeJunitReport.

Parameter Details

<addTestClassPath>

A flag whether the test class path of the project under test should be included in the class path of the pre-/post-build scripts. If set to false, the class path of script interpreter consists only of the runtime dependencies of the Maven Invoker Plugin. If set the true, the project's test class path will be prepended to the interpreter class path. Among others, this feature allows the scripts to access utility classes from the test sources of your project.
  • Type: boolean
  • Since: 1.2
  • Required: No
  • User Property: invoker.addTestClassPath
  • Default: false

<cloneAllFiles>

Some files are normally excluded when copying the IT projects from the directory specified by the parameter projectsDirectory to the directory given by cloneProjectsTo (e.g. .svn, CVS, *~, etc: see reference for full list). Setting this parameter to true will cause all files to be copied to the cloneProjectsTo directory.
  • Type: boolean
  • Since: 1.2
  • Required: No
  • Default: false

<cloneClean>

Ensure the cloneProjectsTo directory is not polluted with files from earlier invoker runs.
  • Type: boolean
  • Since: 1.6
  • Required: No
  • Default: true

<cloneProjectsTo>

Directory to which projects should be cloned prior to execution. If set to null, each integration test will be run in the directory in which the corresponding IT POM was found. In this case, you most likely want to configure your SCM to ignore target and build.log in the test's base directory. (Exception when project using invoker plugin is of maven-plugin packaging: In such case IT projects will be cloned to and executed in target/its by default.)
  • Type: java.io.File
  • Since: 1.1
  • Required: No
  • User Property: invoker.cloneProjectsTo

<debug>

Whether to show debug statements in the build output.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: invoker.debug
  • Default: false

<disableReports>

A flag to disable the generation of build reports.
  • Type: boolean
  • Since: 1.4
  • Required: No
  • User Property: invoker.disableReports
  • Default: false

<encoding>

The file encoding for the pre-/post-build scripts and the list files for goals and profiles.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No
  • User Property: encoding
  • Default: ${project.build.sourceEncoding}

<environmentVariables>

Additional environment variables to set on the command line.
  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Since: 1.8
  • Required: No

<filterProperties>

A list of additional properties which will be used to filter tokens in POMs and goal files.
  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Since: 1.3
  • Required: No

<goals>

The list of goals to execute on each project. Default value is: package.
  • Type: java.util.List<java.lang.String>
  • Since: 1.0
  • Required: No

<invokerPropertiesFile>

The name of an optional project-specific file that contains properties used to specify settings for an individual Maven invocation. Any property present in the file will override the corresponding setting from the plugin configuration. The values of the properties are filtered and may use expressions like ${project.version} to reference project properties or values from the parameter filterProperties.

As of 3.2.0 it is possible to put this folder in any of the ancestor folders, where properties will be inherited. This way you can provide a single properties file for a group of projects

The snippet below describes the supported 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.
# Environment variables used by maven plugins can be added here
invoker.goals = clean install -Dplugin.variable=value

# Or you can give things like this if you need.
invoker.goals = -T2 clean verify

# 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
# can be indexed
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
# can be indexed
invoker.project = sub-module

# The maven executable can either be a file relative to ${maven.home}/bin/, test project workspace
# or an absolute file.
# Since plugin version 3.3.0
# can be indexed
invoker.mavenExecutable = mvnw

# The value for the environment variable MAVEN_OPTS
# can be indexed
invoker.mavenOpts = -Dfile.encoding=UTF-16 -Xms32m -Xmx256m

# Possible values are "fail-fast" (default), "fail-at-end" and "fail-never"
# can be indexed
invoker.failureBehavior = fail-never

# The expected result of the build, possible values are "success" (default) and "failure"
# can be indexed
invoker.buildResult = failure

# A boolean value controlling the aggregator mode of Maven, defaults to "false"

# can be indexed
invoker.nonRecursive = true

# A boolean value controlling the network behavior of Maven, defaults to "false"
# Since plugin version 1.4
# can be indexed
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
# can be indexed
invoker.systemPropertiesFile = test.properties

# An optional human friendly name and description for this build job.
# Both name and description have to be set to be included in the build reports.
# Since plugin version 1.4
invoker.name = Test Build 01
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

# A mapping for toolchain to ensure it exists
# Since plugin version 3.2.0
invoker.toolchain.<type>.<provides> = value
invoker.toolchain.jdk.version = 11

# For java.version, maven.version, os.family and toolchain it is possible to define multiple selectors.
# If one of the indexed selectors matches, the test is executed.
# With the invoker.x.y equivalents you can specify global matchers.
selector.1.java.version = 1.8+
selector.1.maven.version = 3.2.5+
selector.1.os.family = !windows
selector.2.maven.version = 3.0+
selector.3.java.version = 9+

# A boolean value controlling the debug logging level of Maven, , defaults to "false"
# Since plugin version 1.8
# can be indexed
invoker.debug = true

# Whether to execute Maven in quiet mode
# Since plugin version 3.3.0
# can be indexed
invoker.quiet = true

The execution timeout in seconds.
# Since plugin version 3.0.2
# can be indexed
invoker.timeoutInSeconds = 5

# Path to an alternate settings.xml to use for Maven invocation with this IT.
# Since plugin version 3.0.1
# can be indexed
invoker.settingsFile = ../

# An integer value to control run order of projects. sorted in the descending order of the ordinal.
# In other words, the BuildJobs with the highest numbers will be executed first
# Default value is 0 (zero)
# Since plugin version 3.2.1
invoker.ordinal = 3

# The additional value for the environment variable.
# Since plugin version 3.2.2
invoker.environmentVariables.<variableName> = variableValue
invoker.environmentVariables.MY_ENV_NAME = myEnvValue

# A boolean value indicating a check for missing releases and updated snapshots on remote repositories to be done
# Passed to the invoker. Same as passing -U, --update-snapshots flag on the command line
# Since plugin version 3.4.0
invoker.updateSnapshots = true

  • Type: java.lang.String
  • Since: 1.2
  • Required: No
  • User Property: invoker.invokerPropertiesFile
  • Default: invoker.properties

<invokerTest>

A comma separated list of projectname patterns to run. Specify this parameter to run individual tests by file name, overriding the setupIncludes, pomIncludes and pomExcludes parameters. Each pattern you specify here will be used to create an include/exclude pattern formatted like ${projectsDirectory}/pattern. To exclude a test, prefix the pattern with a '!'. So you can just type -Dinvoker.test=SimpleTest,Comp*Test,!Compare* to run builds in ${projectsDirectory}/SimpleTest and ${projectsDirectory}/ComplexTest, but not ${projectsDirectory}/CompareTest
  • Type: java.lang.String
  • Since: 1.1 (exclusion since 1.8)
  • Required: No
  • User Property: invoker.test

<javaHome>

The JAVA_HOME environment variable to use for forked Maven invocations. Defaults to the current Java home directory.
  • Type: java.io.File
  • Since: 1.3
  • Required: No
  • User Property: invoker.javaHome

<junitPackageName>

The package name use in junit report
  • Type: java.lang.String
  • Since: 3.1.2
  • Required: No
  • User Property: invoker.junitPackageName
  • Default: maven.invoker.it

<localRepositoryPath>

The local repository for caching artifacts. It is strongly recommended to specify a path to an isolated repository like ${project.build.directory}/it-repo. Otherwise, your ordinary local repository will be used, potentially soiling it with broken artifacts.
  • Type: java.io.File
  • Since: 1.0
  • Required: No
  • User Property: invoker.localRepositoryPath
  • Default: ${settings.localRepository}

<logDirectory>

By default a build.log is created in the root of the project. By setting this folder files are written to a different folder, respecting the structure of the projectsDirectory.
  • Type: java.io.File
  • Since: 3.2.0
  • Required: No

<mavenExecutable>

mavenExecutable can either be a file relative to ${maven.home}/bin/, test project workspace or an absolute file.
  • Type: java.io.File
  • Since: 1.8
  • Required: No
  • User Property: invoker.mavenExecutable

<mavenHome>

The home directory of the Maven installation to use for the forked builds. Defaults to the current Maven installation.
  • Type: java.io.File
  • Since: 1.3
  • Required: No
  • User Property: invoker.mavenHome

<mavenOpts>

The MAVEN_OPTS environment variable to use when invoking Maven. This value can be overridden for individual integration tests by using invokerPropertiesFile.
  • Type: java.lang.String
  • Since: 1.2
  • Required: No
  • User Property: invoker.mavenOpts

<mergeUserSettings>

If enable and if you have a settings file configured for the execution, it will be merged with your user settings.
  • Type: boolean
  • Since: 1.6
  • Required: No
  • User Property: invoker.mergeUserSettings
  • Default: false

<noLog>

Suppress logging to the build.log file.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: invoker.noLog
  • Default: false

<parallelThreads>

Number of threads for running tests in parallel. This will be the number of maven forked process in parallel. When terminated with "C", the number part is multiplied by the number of processors (cores) available to the Java virtual machine. Floating point value are only accepted together with "C".

Example values: "1.5C", "4"

  • Type: java.lang.String
  • Since: 1.6
  • Required: No
  • User Property: invoker.parallelThreads
  • Default: 1

<pom>

A single POM to build, skipping any scanning parameters and behavior.
  • Type: java.io.File
  • Since: 1.0
  • Required: No
  • User Property: invoker.pom

<pomExcludes>

Exclude patterns for searching the integration test directory. This parameter is meant to be set from the POM. By default, no POM files are excluded. For the convenience of using an include pattern like *, the custom settings file specified by the parameter settingsFile will always be excluded automatically.
  • Type: java.util.List<java.lang.String>
  • Since: 1.0
  • Required: No

<pomIncludes>

Include patterns for searching the integration test directory for projects. This parameter is meant to be set from the POM. If this parameter is not set, the plugin will search for all pom.xml files one directory below projectsDirectory (i.e. */pom.xml).

Starting with version 1.3, mere directories can also be matched by these patterns. For example, the include pattern * will run Maven builds on all immediate sub directories of projectsDirectory, regardless if they contain a pom.xml. This allows to perform builds that need/should not depend on the existence of a POM.
  • Type: java.util.List<java.lang.String>
  • Since: 1.0
  • Required: No

<postBuildHookScript>

Relative path of a cleanup/verification hook script to run after executing the build. This script may be written with either BeanShell or Groovy (since 1.3). If the file extension is omitted (e.g. verify), the plugin searches for the file by trying out the well-known extensions .bsh and .groovy. If this script exists for a particular project but returns any non-null value different from true or throws an exception, the corresponding build is flagged as a failure.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • User Property: invoker.postBuildHookScript
  • Default: postbuild

<preBuildHookScript>

Relative path of a pre-build hook script to run prior to executing the build. This script may be written with either BeanShell or Groovy (since 1.3). If the file extension is omitted (e.g. prebuild), the plugin searches for the file by trying out the well-known extensions .bsh and .groovy. If this script exists for a particular project but returns any non-null value different from true or throws an exception, the corresponding build is flagged as a failure. In this case, neither Maven nor the post-build hook script will be invoked.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • User Property: invoker.preBuildHookScript
  • Default: prebuild

<profiles>

List of profile identifiers to explicitly trigger in the build.
  • Type: java.util.List<java.lang.String>
  • Since: 1.1
  • Required: No

<projectsDirectory>

Directory to search for integration tests.
  • Type: java.io.File
  • Since: 1.0
  • Required: No
  • User Property: invoker.projectsDirectory
  • Default: ${basedir}/src/it/

<properties>

Common set of properties to pass in on each project's command line, via -D parameters.
  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Since: 1.1
  • Required: No

<quiet>

Whether to execute Maven in quiet mode.
  • Type: boolean
  • Since: 3.3.0
  • Required: No
  • User Property: invoker.quiet
  • Default: false

<reportsDirectory>

Base directory where all build reports are written to. Every execution of an integration test will produce an XML file which contains the information about success or failure of that particular build job. The format of the resulting XML file is documented in the given build-job reference.
  • Type: java.io.File
  • Since: 1.4
  • Required: No
  • User Property: invoker.reportsDirectory
  • Default: ${project.build.directory}/invoker-reports

<scriptVariables>

Additional variables for use in the hook scripts.
  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Since: 1.9
  • Required: No

<selectorScript>

Relative path of a selector script to run prior in order to decide if the build should be executed. This script may be written with either BeanShell or Groovy. If the file extension is omitted (e.g. selector), the plugin searches for the file by trying out the well-known extensions .bsh and .groovy. If this script exists for a particular project but returns any non-null value different from true, the corresponding build is flagged as skipped. In this case, none of the pre-build hook script, Maven nor the post-build hook script will be invoked. If this script throws an exception, the corresponding build is flagged as in error, and none of the pre-build hook script, Maven not the post-build hook script will be invoked.
  • Type: java.lang.String
  • Since: 1.5
  • Required: No
  • User Property: invoker.selectorScript
  • Default: selector

<settingsFile>

Path to an alternate settings.xml to use for Maven invocation with all ITs. Note that the <localRepository> element of this settings file is always ignored, i.e. the path given by the parameter localRepositoryPath is dominant.
  • Type: java.io.File
  • Since: 1.2
  • Required: No
  • User Property: invoker.settingsFile

<setupIncludes>

Include patterns for searching the projects directory for projects that need to be run before the other projects. This parameter allows to declare projects that perform setup tasks like installing utility artifacts into the local repository. Projects matched by these patterns are implicitly excluded from the scan for ordinary projects. Also, the exclusions defined by the parameter pomExcludes apply to the setup projects, too. Default value is: setup*/pom.xml.
  • Type: java.util.List<java.lang.String>
  • Since: 1.3
  • Required: No

<showErrors>

Whether to show errors in the build output.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: invoker.showErrors
  • Default: false

<showVersion>

flag to enable show mvn version used for running its (cli option : -V,--show-version )
  • Type: boolean
  • Since: 1.4
  • Required: No
  • User Property: invoker.showVersion
  • Default: false

<skipInvocation>

Flag used to suppress certain invocations. This is useful in tailoring the build using profiles.
  • Type: boolean
  • Since: 1.1
  • Required: No
  • User Property: invoker.skip
  • Default: false

<streamLogs>

Flag used to determine whether the build logs should be output to the normal mojo log.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: invoker.streamLogs
  • Default: false

<suppressSummaries>

Flag used to suppress the summary output notifying of successes and failures. If set to true, the only indication of the build's success or failure will be the effect it has on the main build (if it fails, the main build should fail as well). If streamLogs is enabled, the sub-build summary will also provide an indication.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • Default: false

<testPropertiesFile>

Location of a properties file that defines CLI properties for the test.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • User Property: invoker.testPropertiesFile
  • Default: test.properties

<timeoutInSeconds>

(no description)
  • Type: int
  • Since: 3.0.2
  • Required: No
  • User Property: invoker.timeoutInSeconds
  • Default: 0

<updateOnly>

Only invoke maven projects if their sources have been modified since they were last built. Only works in conjunction with cloneProjectsTo.
  • Type: boolean
  • Since: 3.2.2
  • Required: No
  • User Property: invoker.updateOnly
  • Default: false

<updateSnapshots>

Force a check for missing releases and updated snapshots on remote repositories. This is passed to the invoked maven projects (it is the same as if you were to use the -U, --update-snapshots flag on the command line).
  • Type: boolean
  • Since: 3.4.0
  • Required: No
  • User Property: invoker.updateSnapshots
  • Default: false

<writeJunitReport>

Write test result in junit format.
  • Type: boolean
  • Since: 3.1.2
  • Required: No
  • User Property: invoker.writeJunitReport
  • Default: false