I would try the Build Helper Maven Plugin.
The parse-version
goal parses the version to get the component parts, and regex-property
does replacements.
I've also used the GMaven plugin before to set properties, but not for as specific a use case as yours. This answer gives the idea.