Is there a goal one can execute that will just echo the version of a pom? I can think of a way to make it work using the maven-ant-plugin, but that requires me to have ant-plugin configuration in the pom and I would like a method that would work with any pom.
mvn help:evaluate -Dexpression=project.version
If you want just the version echoed, and not the rest of the Maven "noise", you would use
mvn help:evaluate -Dexpression=project.version -q -DforceStdout
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With