Created
May 20, 2015 10:07
-
-
Save loverdos/99bbd34097b8a00f52be to your computer and use it in GitHub Desktop.
Get maven project version from the shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvn help:evaluate -Dexpression=project.version | grep -e '^[^\[]' |
Grepping in POM does not honor maven core plug-ins that may alter the version at runtime (e.g. git branch versioning plug-in). So https://gist.github.com/loverdos/99bbd34097b8a00f52be#gistcomment-2721978 looks like the best solution to me.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@KalivarapuReshma Thanks for that command, I have used it to create this Docker Hub hook script to tag Maven projects with their version