I try to extract the project.version from my maven project pom file using the help plug-in and assign it to a variable so I can use it to push my docker image.
- step:
script: # Modify the commands below to build your repository.
- POM_VERSION='mvn help:evaluate -Dexpression=project.version -q -DforceStdout'
- echo "version ${POM_VERSION}"
But all I get in my log is
<span>version mvn help:evaluate -Dexpression=project.version -q -DforceStdout</span>
When I expected to get
version 1.0.4
<span>How can I get the command output assigned to a variable?</span>