2019-04-01 11:22:28 +02:00
# ${docGenStepName}
2017-12-06 13:03:06 +02:00
2019-04-01 11:22:28 +02:00
## ${docGenDescription}
2017-12-06 13:03:06 +02:00
2019-04-01 11:22:28 +02:00
## ${docGenParameters}
2017-12-06 13:03:06 +02:00
2020-05-06 17:43:32 +02:00
!!! 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 ).
2020-09-24 07:41:06 +02:00
What you pass in is literally passed to Maven without any shell interpreter in between.
2020-05-06 17:43:32 +02:00
The old behavior is still available in version `v1.23.0` and before of project "Piper".
2019-04-01 11:22:28 +02:00
## ${docGenConfiguration}
2017-12-06 13:03:06 +02:00
2019-05-24 15:44:31 +02:00
## ${docJenkinsPluginDependencies}
2019-05-24 15:41:49 +02:00
2017-12-06 13:03:06 +02:00
## Exceptions
None
## Example
```groovy
2020-05-06 17:43:32 +02:00
mavenExecute script: this, goals: ['clean', 'install']
2017-12-06 13:03:06 +02:00
```
2020-05-11 13:52:42 +02:00
Example for the correct usage of `goals` , `defines` and `flags` in version `v1.24.0` and newer:
```groovy
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.