Pipeline Maven Integration Plugin

withMaven: Provide Maven environment

Configures maven environment to use within a pipeline job by calling sh mvn or bat mvn. The selected maven installation will be configured and prepended to the path.
globalMavenSettingsConfig (optional)
Select a global maven settings element from File Config Provider. The settings element in the settings.xml file contains elements used to define values which configure Maven execution in various ways, like the pom.xml, but should not be bundled to any specific project, or distributed to an audience. These include values such as the local repository location, alternate remote repository servers, and authentication information.

see also: settings.xml reference

Type: String

globalMavenSettingsFilePath (optional)
Specify a global maven settings.xml file. The specified path can be absolute or relative to the workspace. Shell-like environment variable expansions work in this field, by using the ${VARIABLE} syntax. The file existence is checked on the build agent, if found, that one is used. If not found it will be checked on the master. The settings element in the settings.xml file contains elements used to define values which configure Maven execution in various ways, like the pom.xml, but should not be bundled to any specific project, or distributed to an audience. These include values such as the local repository location, alternate remote repository servers, and authentication information.
There are two locations where a settings.xml file per default may live:
  • The Maven install - default: $M2_HOME/conf/settings.xml
  • A user's install - default: ${user.home}/.m2/settings.xml
The former settings.xml are also called global settings, the latter settings.xml are referred to as user settings. If both files exists, their contents gets merged, with the user-specific settings.xml being dominant.

see also: settings.xml reference

Type: String

jdk (optional)
Select a JDK installation. If auto-install is disabled, the JDK will be downloaded and made available for the pipeline job.

Note: This option does not work with docker.image('xxx').inside, the preinstalled JDK on the docker image will be used.

Type: String

maven (optional)
Select a Maven installation. If auto-install is disabled, maven will be downloaded and made available for the pipeline job.

Note: This option does not work with docker.image('xxx').inside, the preinstalled maven on the docker image will be used.

Type: String

mavenLocalRepo (optional)
Specify a custom local repository path. Shell-like environment variable expansions work with this field, by using the ${VARIABLE} syntax. Normally, Jenkins uses the local Maven repository as determined by Maven, by default ~/.m2/repository and can be overridden by <localRepository> in ~/.m2/settings.xml (see Configuring your Local Repository))

This normally means that all the jobs that are executed on the same node shares a single Maven repository. The upside of this is that you can save the disk space, the downside is that the repository is not multi process safe and having multiple builds run concurrently can corrupt it. Additionally builds could interfere with each other by sharing incorrect or partially built artifacts. For example, you might end up having builds incorrectly succeed, just because your have all the dependencies in your local repository, despite that fact that none of the repositories in POM might have them.

By using this option, Jenkins will tell Maven to use a custom path for the build as the local Maven repository by using -Dmaven.repo.local
If specified as a relative path then this value well be resolved against the workspace root and not the current working directory.
ie. if .repository is specified then $WORKSPACE/.repository will be used.

This means each job could get its own isolated Maven repository just for itself. It fixes the above problems, at the expense of additional disk space consumption.

When using this option, consider setting up a Maven artifact manager so that you don't have to hit remote Maven repositories too often.

Type: String

mavenOpts (optional)
Specify JVM specific options needed when launching Maven as an external process, these are not maven specific options. See: Java Options

Shell-like environment variable expansions work in this field, by using the ${VARIABLE} syntax.

Type: String

mavenSettingsConfig (optional)
Select a maven settings element from File Config Provider. The settings element in the settings.xml file contains elements used to define values which configure Maven execution in various ways, like the pom.xml, but should not be bundled to any specific project, or distributed to an audience. These include values such as the local repository location, alternate remote repository servers, and authentication information.

see also: settings.xml reference

Type: String

mavenSettingsFilePath (optional)
Specify a maven settings.xml file. The specified path can be absolute or relative to the workspace. Shell-like environment variable expansions work in this field, by using the ${VARIABLE} syntax. The file existence is checked on the build agent, if found, that one is used. If not found it will be checked on the master. The settings element in the settings.xml file contains elements used to define values which configure Maven execution in various ways, like the pom.xml, but should not be bundled to any specific project, or distributed to an audience. These include values such as the local repository location, alternate remote repository servers, and authentication information.
There are two locations where a settings.xml file per default may live:
  • The Maven install - default: $M2_HOME/conf/settings.xml
  • A user's install - default: ${user.home}/.m2/settings.xml
The former settings.xml are also called global settings, the latter settings.xml are referred to as user settings. If both files exists, their contents gets merged, with the user-specific settings.xml being dominant.

see also: settings.xml reference

Type: String

options (optional)

Array/List

Nested Choice of Objects $class: DependenciesFingerprintPublisher

Fingerprint the Maven dependencies used by the maven project.
disabled (optional)
Skip the fingerprinting of the dependencies of the maven project.

Type: boolean

includeReleaseVersions (optional)

Type: boolean

includeScopeCompile (optional)

Type: boolean

includeScopeProvided (optional)

Type: boolean

includeScopeRuntime (optional)

Type: boolean

includeScopeTest (optional)

Type: boolean

includeSnapshotVersions (optional)

Type: boolean

$class: FindbugsAnalysisPublisher

Publish FindBugs reports generated by " org.codehaus.mojo:findbugs-maven-plugin:findbugs".
FindBugs results are by default published if the Jenkins FindBugs Plugin is installed.
disabled (optional)
Skip the publishing of findbugs reports.

Type: boolean

$class: GeneratedArtifactsPublisher

Archive and fingerprint the artifact and the attached artifacts generated by the maven project.
disabled (optional)
Skip the archiving and the fingerprinting of generated artifacts.

Type: boolean

$class: JunitTestsPublisher

Publish tests reports generated by " maven-surefire-plugin:test" or by " maven-failsafe-plugin:integration-test".
Test results are by default published if the Jenkins JUnit Plugin is installed.
disabled (optional)
Skip the publishing of tests reports.

Type: boolean

ignoreAttachments (optional)
Skip the publishing of tests reports attachments.
Test result attachments are by default published if the Jenkins JUnit Attachments Plugin is installed.

Type: boolean

$class: TasksScannerPublisher

Publish Open Task Scanner reports.
Open Task Scanner reports are by default published if the Jenkins Task Scanner Plugin is installed.
The default setup is to look in Java source code for " FIXME" comments as high priority tasks and for " TODO" comments as normal priority tasks.
asRegexp (optional)
Use task identifiers as regular expressions.

Type: boolean

disabled (optional)
Skip the publishing of Task Scanner reports.

Type: boolean

excludePattern (optional)
Ant style pattern of exclude source code.

Type: String

highPriorityTaskIdentifiers (optional)
Coma separated list of high priority task identifiers.

Type: String

ignoreCase (optional)
Ignore case when scanning task identifiers.

Type: boolean

lowPriorityTaskIdentifiers (optional)
Coma separated list of low priority task identifiers.

Type: String

normalPriorityTaskIdentifiers (optional)
Coma separated list of normal priority task identifiers.

Type: String

pattern (optional)
Ant style pattern of the source code to scan for task identifiers.

Type: String