I have a pom file. I want to read the version of the first dependency in the dependencies tag and use that version to tag our docker image.
I am using this command to get the project version.
mvn help:evaluate -Dexpression=project.parent.version:1 -q -DforceStdout
I want to get the version of the first dependency using command line , and from there it will passed onto the docker tag and docker push.