Full name:
org.apache.maven.plugins:maven-invoker-plugin:1.3:run
Description:
Attributes:
test
.1.0
.integration-test
.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 . |
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). Setting this parameter to
true will cause all files to be copied to the
cloneProjectsTo directory.Default value is: false . |
cloneProjectsTo | File |
1.1 |
Directory to which projects should be cloned prior to execution. If
not specified, 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. |
debug | boolean |
1.0 |
Whether to show debug statements in the build output. Default value is: false . |
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} . |
filterProperties | Map |
1.3 |
A list of additional properties which will be used to filter tokens
in POMs and goal files. |
goals | List |
1.0 |
The list of goals to execute on each project. Default value is:
package . |
goalsFile | String |
1.0 |
Deprecated. {0}. As of version 1.2, the key invoker.goals from the
properties file specified by the parameter
invokerPropertiesFile should be used instead.Default value is: goals.txt . |
ignoreFailures | boolean |
1.3 |
A flag controlling whether failures of the sub builds should fail
the main build, too. If set to true , the main build
will proceed even if one or more sub builds failed.Default value is: false . |
interpolationsProperties | Properties |
1.1 |
Deprecated. {0}. As of version 1.3, the parameter filterProperties
should be used instead. |
invokerPropertiesFile | String |
1.2 |
The name of an optional test-specific file that contains properties
used to configure the invocation of an integration test. This
properties file may be used to specify settings for an individual
test 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 . 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 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 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 -N flag, defaults to "false" invoker.nonRecursive=false Default value is: invoker.properties . |
invokerTest | String |
1.1 |
A comma separated list of project names 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 pattern formatted like
${projectsDirectory}/pattern , so you can just
type -Dinvoker.test=FirstTest,SecondTest to run builds
in ${projectsDirectory}/FirstTest and
${projectsDirectory}/SecondTest . |
javaHome | File |
1.3 |
The JAVA_HOME environment variable to use for forked
Maven invocations. Defaults to the current Java home directory. |
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} . |
mavenHome | File |
1.3 |
The home directory of the Maven installation to use for the forked
builds. Defaults to the current Maven installation. |
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 . |
noLog | boolean |
1.0 |
Suppress logging to the build.log file.Default value is: false . |
pom | File |
1.0 |
A single POM to build, skipping any scanning parameters and
behavior. |
pomExcludes | List |
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 |
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 value different from true or
throws an exception, the corresponding build is flagged as a
failure.Default value is: postbuild . |
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 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 . |
profiles | List |
1.1 |
List of profile identifiers to explicitly trigger in the build. |
profilesFile | String |
1.1 |
Deprecated. {0}. As of version 1.2, the key invoker.profiles from the
properties file specified by the parameter
invokerPropertiesFile should be used instead.Default value is: profiles.txt . |
projectsDirectory | File |
1.0 |
Directory to search for integration tests. Default value is: ${basedir}/src/it/ . |
properties | Map |
1.1 |
Common set of properties to pass in on each project's command line,
via -D parameters. |
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. |
setupIncludes | List |
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 . |
skipInvocation | boolean |
1.1 |
Flag used to suppress certain invocations. This is useful in
tailoring the build using profiles. Default value is: false . |
streamLogs | boolean |
1.0 |
Flag used to determine whether the build logs should be output to
the normal mojo log. Default value is: false . |
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 . |
testProperties | Properties |
1.0 |
Deprecated. {0}. As of version 1.1, use the properties parameter
instead. |
testPropertiesFile | String |
1.0 |
Location of a properties file that defines CLI properties for the
test. Default value is: test.properties . |
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.boolean
1.2
No
${invoker.addTestClassPath}
false
.svn
,
CVS
, *~
, etc). Setting this parameter to
true
will cause all files to be copied to the
cloneProjectsTo directory.boolean
1.2
No
false
target
and
build.log
in the test's base directory.java.io.File
1.1
No
boolean
1.0
No
${invoker.debug}
false
java.lang.String
1.2
No
${encoding}
${project.build.sourceEncoding}
java.util.Map
1.3
No
package
.java.util.List
1.0
No
invoker.goals
from the
properties file specified by the parameter
invokerPropertiesFile
should be used instead.java.lang.String
1.0
No
${invoker.goalsFile}
goals.txt
true
, the main build
will proceed even if one or more sub builds failed.boolean
1.3
No
${maven.test.failure.ignore}
false
filterProperties
should be used instead.java.util.Properties
1.1
No
${project.version}
to reference project properties or
values from the parameter filterProperties
. 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 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 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 -N flag, defaults to "false" invoker.nonRecursive=false
java.lang.String
1.2
No
${invoker.invokerPropertiesFile}
invoker.properties
setupIncludes
, pomIncludes
and
pomExcludes
parameters. Each pattern you specify here
will be used to create an include pattern formatted like
${projectsDirectory}/pattern
, so you can just
type -Dinvoker.test=FirstTest,SecondTest
to run builds
in ${projectsDirectory}/FirstTest
and
${projectsDirectory}/SecondTest
.java.lang.String
1.1
No
${invoker.test}
JAVA_HOME
environment variable to use for forked
Maven invocations. Defaults to the current Java home directory.java.io.File
1.3
No
${invoker.javaHome}
${project.build.directory}/it-repo
. Otherwise, your
ordinary local repository will be used, potentially soiling it with
broken artifacts.java.io.File
1.0
No
${invoker.localRepositoryPath}
${settings.localRepository}
java.io.File
1.3
No
${invoker.mavenHome}
MAVEN_OPTS
environment variable to use when
invoking Maven. This value can be overridden for individual
integration tests by using invokerPropertiesFile
.java.lang.String
1.2
No
${invoker.mavenOpts}
build.log
file.boolean
1.0
No
${invoker.noLog}
false
pom:
java.io.File
1.0
No
${invoker.pom}
*
, the custom settings file specified by the parameter
settingsFile
will always be excluded automatically.java.util.List
1.0
No
pom.xml
files one directory below
projectsDirectory
(i.e. */pom.xml
).*
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.java.util.List
1.0
No
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 value different from true
or
throws an exception, the corresponding build is flagged as a
failure.java.lang.String
1.0
No
${invoker.postBuildHookScript}
postbuild
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 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.java.lang.String
1.0
No
${invoker.preBuildHookScript}
prebuild
java.util.List
1.1
No
invoker.profiles
from the
properties file specified by the parameter
invokerPropertiesFile
should be used instead.profiles
is set.java.lang.String
1.1
No
${invoker.profilesFile}
profiles.txt
java.io.File
1.0
No
${invoker.projectsDirectory}
${basedir}/src/it/
java.util.Map
1.1
No
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.java.io.File
1.2
No
${invoker.settingsFile}
pomExcludes
apply to the setup projects, too. Default
value is: setup*/pom.xml
.java.util.List
1.3
No
boolean
1.0
No
${invoker.showErrors}
false
boolean
1.1
No
false
boolean
1.0
No
${invoker.streamLogs}
false
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.boolean
1.0
No
false
properties
parameter
instead.java.util.Properties
1.0
No
java.lang.String
1.0
No
${invoker.testPropertiesFile}
test.properties