Parent pom maven with different versions for children

Our applications have several modules, each of which has its own separate version and depends on other modules (external to our organization). All of them have a parent POM, which has its own version, independent of the version for children.

When one of these modules changes, they are converted to snapshots.

In the following example:

Parent v14.0
- module1 v1.5.0
    - dependency1(module2 v15.0.0)
    - dependency2(external-jar v12.0.1)
- module2 v15.0.0
- module3 v3.1.0

If a change occurs in module2, then the version of module2 becomes v15.0-SNAPSHOT, then module1 becomes v1.5-SNAPSHOT. The parent remains unchanged. The goal of not having the same version on the parent + modules is that we want to localize the updates made for some modules and not affect the versions of others.

It was developed a long time ago, and there are several bash scripts to support updates, although they do not handle all cases. In any case, we do not have a one-click process, and we feel that we are quite far from it with this approach.

We do not know how to convince management of a single option for all modules. How do you feel about this? Have you ever come across a project using the above structure and how well did it work?

Thank!

+4
source share
2 answers

I had to deal with such situations before. There is an actual benefit from decentralized versions, especially in cases where your product is made up of a large number of modules, and this is due to the following facts:

  • , ( ).

  • , .

  • , .

  • , , , , , , .

  • / , .

  • .

  • , , , (, , ).

:

, , , . , , . , , ... , , .

, , .

+4

: , , .

Maven , - .

, :

  • , . .
  • ( ), .
  • , ( Maven).

-, homebrew, .

, .

+1

Source: https://habr.com/ru/post/1532631/


All Articles