Multi-module application and versioning strategy

103 Views Asked by At

I have a Spring boot application with several modules (I'm using Maven) and each module includes several other modules/libs (eg. for MongoDB, MySQL, ActiveDirectory etc.) and some of them are in common among these modules.

Eg.

Module A (API REST)
- include lib X
- include lib Y 

Module B (Batch Job)
- include lib X
- include lib Z

Module C (API REST)
- include lib X
- include lib Y
- include lib R

these (X, Y, Z) libs/modules are other maven modules not third part libraries that we can find on Maven Central Repository.

This is not a micro-services application as we usually intend and, at the same time, it's not a monolithic application but a sort of "macro-services" application.

I can release one these macro-modules independently (e.g. release a new version of Module A but not B).

Which is the best way to handle the versioning of all these modules?

Using the semantic versioning for each module/lib?

e.g. I make a bug-fix on lib Z than Module A and B will be released as 1.0.1?

So:

lib Z (1.0.0 => 1.0.1)
Module A (1.0.0 => 1.0.1) because depends on lib Z
Module B (1.0.0 => 1.0.1) because depends on lib Z

But what the will be the version number of the entire application that I can define in the root POM.xml?

I'm asking this because we are using a GITFlow release branch strategy and AWS Service Catalog for the production release distribution.

A datetime versioning for the Service Catalog release could be useful in this case?

E.g.

lib Z (1.0.0 => 1.0.1)
Module A (1.0.0 => 1.0.1)
Module B (1.0.0 => 1.0.1)

Service catalog release 20230724 will contain all the modules reference through CloudFormation Stacks.

Or should I kepp using the semantic versioning even for the Service Catalog release?

In this case the version number for the Service Catalog (entire product) release which logic should follow?

E.g.

Bug fix on Module A => Service Catalog release 1.0.1 (because mod. A 1.0.1 - mod. B 1.0.0)
Feature improvement on Module B => Service catalog release 1.1.0 (because mod. A 1.0.1 - mod. B 1.1.0)

Pros and Cons of each versioning stragey?

Thanks in advance.

0

There are 0 best solutions below