question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BOM pulls in Spring BOM version

See original GitHub issue

I am not sure if the following is intended or not:

riptide-bom inherits from riptide-parent, which pins a whole lot of additional dependencies other than riptide. Among these are the BOM for spring-boot-dependencies and spring-framework.

When using Spring’s dependency management plugin and gradle to import riptide’s bom it’ll override the project’s Spring Boot version (and in turn all other dependencies defined by Spring):

buildscript {
    dependencies {
        classpath "org.springframework.boot:spring-boot-gradle-plugin:2.2.2.RELEASE"
    }
}

...

dependencyManagement {
    imports {
        mavenBom "org.zalando:riptide-bom:3.0.0-RC.9"
    }
}

...

Now riptide-bom:3.0.0-RC.9 pulls in dependencies declared in riptide-parent, which in turn defines spring-boot-dependencies at version 2.2.1.RELEASE. This will then be the version used for the whole project. The same applies for all dependencies defined in the parent pom’s <dependencyManagement> section.

Expected Behavior

Riptide-bom defines only riptide dependencies and nothing else.

Actual Behavior

Riptide-bom defines dependency versions other than riptide. Among these is spring-boot-dependencies BOM. This messes the full dependency tree up and is rather difficult to mitigate.

Possible Fix

  1. Do not inherit from riptide-parent in riptide-bom.
  2. Split riptide-parent into two poms: one that defines metadata, e.g. riptide-build, and another that inherits from it and defines project-wide versions. Then inherit riptide-bom from riptide-build.
  3. Do not add <dependencyManagement> section in riptide-parent. (Somewhat defeats the purpose of it than 😄)

(The same issue applies to logbook-bom. I’m not going to create a ticket there for now.)

Does that make sense? Maybe I am doing something stupid here?!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
fatroomcommented, Jan 9, 2020

@whiskeysierra correct, root everything beside dependency management, parent inherits from root and adds dependency management. bom inherits from root, others from parent

1reaction
fatroomcommented, Jan 9, 2020

yep, will take care

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Maven's Bill of Materials (BOM)
With a new version of Spring Boot, a new BOM file will be provided that handles version upgrades and makes sure that all...
Read more >
Spring with Maven BOM
Learn how to use a BOM, Bill of Materials, in your Spring Maven project. ... pulls in a transitive dependency to an older...
Read more >
2. Introduction to the Spring Framework
Spring handles the infrastructure so you can focus on your application. ... of using the BOM is that you no longer need to...
Read more >
Maven BOM - Bill Of Materials Dependency
To solve version mismatch issue, you can use the concept of a “bill of materials” (BOM) dependency. A BOM dependency keep track of...
Read more >
Missing version when using bom - maven
The idea is all projects import the bom so I can keep version consistent across modules. When trying to build the Customers module,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found