Is there any way a Jenkins build can be aware of the Maven version number of a project after processing the POM?
I\'ve got some projects where versioning is controll
Based on @Akom`s answer the pre steps to have POM_VERSION are:
Script
mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -l project_version
# grep for the version pattern rather than not mentioning '\['
echo "POM_VERSION=$(grep -E '^[0-9.]+(-SNAPSHOT)?$' project_version)" > your_property_file