You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-11-29 22:58:09 +02:00
* fix Markdown issue 'Headers should be surrounded by blank lines' * fix MD012 * fix MD022 * fix MD026 * fix MD007 * fix MD032 * fix MD038 * fix MD040 * fix MD031 * fix MD034 * fix MD004 * fix new findings * fix MD036 * fix MD038 * fix MD032 * fix MD006
2.4 KiB
2.4 KiB
mavenExecute
Description
Executes a maven command inside a Docker container.
Parameters
| parameter | mandatory | default | example values |
|---|---|---|---|
script |
yes | ||
dockerImage |
no | 'maven:3.5-jdk-7' | |
globalSettingsFile |
no | 'local_folder/settings.xml' | |
projectSettingsFile |
no | ||
pomPath |
no | 'local_folder/m2' | |
flags |
no | '-o' | |
goals |
no | 'clean install' | |
m2Path |
no | 'local_folder/m2' | |
defines |
no | '-Dmaven.tests.skip=true' | |
logSuccessfulMavenTransfers |
no | false |
'true' |
scriptdefines the global script environment of the Jenkinsfile run. Typicallythisis passed to this parameter. This allows the function to access the commonPipelineEnvironment for retrieving, for example, configuration parameters.dockerImageName of the docker image that should be used.globalSettingsFilePath or url to the mvn settings file that should be used as global settings file.projectSettingsFilePath or url to the mvn settings file that should be used as project settings file.pomPathPath to the pom file that should be used.flagsFlags to provide when running mvn.goalsMaven goals that should be executed.m2PathPath to the location of the local repository that should be used.definesAdditional properties.logSuccessfulMavenTransfersconfigures maven to log successful downloads. This is set tofalseby default to reduce the noise in build logs.
Step configuration
The following parameters can also be specified as step parameters using the global configuration file:
dockerImageglobalSettingsFileprojectSettingsFilepomPathm2Path
Exceptions
None
Example
mavenExecute script: this, goals: 'clean install'