I have a utility service x which is in maven repo and is used by some of my other services. We normally update the minor version of the service x when we make small changes and we are currently on version 1.0.15. No I am making another change and I was thinking whether I should update version to 1.0.16 or I should update the version like 1.1.0. If anyone can provide an explanation on how this should be done in general, that would I am sure help other developers as well as me. Please let me know if you need further information.
Asked
Active
Viewed 1,953 times
4
-
4Have you considered using [semantic versioning](https://semver.org/)? A minor version would indicate new features, bug fixes, etc. Major versions would indicate a breaking change or other system-level modification. – D M Jan 11 '21 at 14:24
1 Answers
12
Different projects follow different standards on this, so follow what the repository has done to date.
A well-regarded standard for this is called Semantic Versioning (https://semver.org/). If you are starting a new project or there isn't a standard already in place, I would recommend using this.
Semantic Versions are in the format: MAJOR.MINOR.PATCH
.
- If you have fixed a bug: increase the patch version
- If you have introduced new functionality in a non-breaking way: increase the minor version (and reset patch to 0)
- If you have introduced breaking changes: increase the major version (and reset the patch and minor version to 0).
If you are unsure whether your change is a breaking change or not - consider your package (or API) from its consumers' perspectives. If their code has to change as a result of your change then it's a breaking change.

D Hudson
- 1,004
- 5
- 12
-
-
1A breaking change is something that changes the behaviour of the system such that something that worked with the previous version of the system will no longer work with the new version. – mbesso Feb 27 '23 at 09:20