mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-16 11:09:33 +02:00
b219fb6514
* fix typos in step yamls * fix typos in go files * regenerate step code * fix typos in md files * fix typos in groovy files * fix further typos
1.6 KiB
1.6 KiB
${docGenStepName}
${docGenDescription}
${docGenParameters}
!!! note "Breaking change in goals
, defines
and flags
parameters"
The goals
, defines
and flags
parameters of the step need to be lists of strings with each element being one item.
As an example consider this diff, showing the old api deleted and the new api inserted:
```diff
-goals: 'org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate',
-defines: "-Dexpression=$pomPathExpression -DforceStdout -q",
+goals: ['org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate'],
+defines: ["-Dexpression=$pomPathExpression", "-DforceStdout", "-q"],
```
Additionally please note that in the parameters _must not_ be [shell quoted/escaped](https://www.tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_03.html).
What you pass in is literally passed to Maven without any shell interpreter in between.
The old behavior is still available in version `v1.23.0` and before of project "Piper".
${docGenConfiguration}
${docJenkinsPluginDependencies}
Exceptions
None
Example
mavenExecute script: this, goals: ['clean', 'install']
Example for the correct usage of goals
, defines
and flags
in version v1.24.0
and newer:
mavenExecute(
script: script,
goals: ['org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate'],
defines: ["-Dexpression=$pomPathExpression", "-DforceStdout", "-q"],
returnStdout: true
)
Note that it does not work to put multiple arguments into one element of a list, so defines: ["-Dexpression=$pomPathExpression -DforceStdout -q"]
does not work.