From b51230139a6daffb817be7c6456e615e3519fc05 Mon Sep 17 00:00:00 2001 From: Florian Wilhelm Date: Mon, 11 May 2020 13:52:42 +0200 Subject: [PATCH] Improve docs on new mavenExecute api (#1525) --- documentation/docs/steps/mavenExecute.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/documentation/docs/steps/mavenExecute.md b/documentation/docs/steps/mavenExecute.md index 440571aeb7..31b6a1df3f 100644 --- a/documentation/docs/steps/mavenExecute.md +++ b/documentation/docs/steps/mavenExecute.md @@ -34,3 +34,16 @@ None ```groovy mavenExecute script: this, goals: ['clean', 'install'] ``` + +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.