How to automate control of synchronization between Maven artefact version and Git tag? Given the following situation:


in a POM file in the repo root (Atlassian BitBucket) I can define that this POM has e.g. the version 0.0.1-SNAPSHOT
then I can tag the codebase whatever I want like v.0.1.


This would be then inconsistent versioning. Is there a better/established way than some custom scripting to control sync of this?
then I can tag the codebase whatever I want like v.0.1


One could use semantic versioning, i.e. X.Y.Z. instead of v.0.1