mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-16 11:09:33 +02:00
6dc13801b0
Disable download logs in Maven by default This commit adds a flag to Maven by default, which disables the messages like "Downloading from central". The logger is set to level "warn", so errors will still be visible, but successful messages won't clutter logs anymore. This option is also set by default in the GitLab CI template file for maven. See [1] for reference on the option. 1: https://stackoverflow.com/a/35653426/8843830
53 lines
2.1 KiB
Markdown
53 lines
2.1 KiB
Markdown
# mavenExecute
|
|
|
|
## Description
|
|
|
|
Executes a maven command inside a Docker container.
|
|
|
|
## Parameters
|
|
|
|
| parameter | mandatory | default | example values |
|
|
| -------------------------------|-----------|-------------------|----------------------------|
|
|
| `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' |
|
|
|
|
* `dockerImage` Name of the docker image that should be used.
|
|
* `globalSettingsFile` Path or url to the mvn settings file that should be used as global settings file.
|
|
* `projectSettingsFile` Path or url to the mvn settings file that should be used as project settings file.
|
|
* `pomPath` Path to the pom file that should be used.
|
|
* `flags` Flags to provide when running mvn.
|
|
* `goals` Maven goals that should be executed.
|
|
* `m2Path` Path to the location of the local repository that should be used.
|
|
* `defines` Additional properties.
|
|
* `logSuccessfulMavenTransfers` configures maven to log successful downloads. This is set to `false` by 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:
|
|
|
|
* `dockerImage`
|
|
* `globalSettingsFile`
|
|
* `projectSettingsFile`
|
|
* `pomPath`
|
|
* `m2Path`
|
|
|
|
## Exceptions
|
|
|
|
None
|
|
|
|
## Example
|
|
|
|
```groovy
|
|
mavenExecute script: this, goals: 'clean install'
|
|
```
|
|
|
|
|
|
|
|
|