How do you manage several imported Maven BOMs

277 Views Asked by At

Using Maven BOM is a great way to manage dependencies. However, you might have situations where you have to manage imports of several BOMs within the same project. In that situation, it's of course possible that you end up having the same dependency define in different versions. Let's say I'm using a spring-bom and a framework for web-developement, itself importing some of the spring dependencies. How do you guys manage such a situation? Does the concept of a "meta-BOM" exist? Where do you finally centralize your versions?

1

There are 1 best solutions below

1
J Fabian Meier On

BOMs are great, but overlapping BOMs are a problem.

AFAIK there is no general mechanism to cope with this. You can define a "super BOM" which imports BOMs and contains dependencyManagement to override versions, but it most cases, it is probably easier to track the few dependencies that overlap manually.