We have a workflow requirement that essentially mean that we need to have the artifact version of a module externally defined from the current branch in git.
I.e. if
Disclaimer: I am the author
My maven core extension will virtually set the version based on the current branch or tag. You can config custom version format patterns as you like.
https://github.com/qoomon/maven-branch-versioning-extension
Version Format Example