Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
387 views
in Technique[技术] by (71.8m points)

maven - When is the right time to update a major version and not minor version in your pom?

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...