Maven semantic versioning
Hi, I would like to implement the following semantic version ING scheme for my company in a maven parent or archetype.
M.m.R.P-B
M: Major Version
m: Minor Version
R: Revision (Sprint number)
P: patch
B: Build number
The Build number should always be incrementing if the project is packaged. Please don't try to argue with me that this scheme is dumb, this was a requirement by our QA department which is not willing do deviate from their scheme of allways incrementing numbers. I don't work at a tech company and I don't make the rules.
I'd rather have the build be dependent on the patch, and allways reset for a new patch, but that's not allowed.
How would you implement something like this?
I tried the release plugin for maven and the version plugin, but I was not too successful with any of them.3 Replies
⌛
This post has been reserved for your question.
Hey @NeoCortex97! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
In principle, you can access properties from within the
<version>
but you'll get a warning each time you are building it
Alternatively (assuming it's about CI builds only) you can edit the XML file to add the build number to the pom.xml before building
I think there's also some Maven plugin for git describe
in versions or whatever
so in the pom.xml you just have M.m and the CI adds the other parts💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.