spring-projects / spring-projects/spring-boot

Cross-reference Dedicated Spring Boot BOM for Consistent Resolution

Open
#32,412 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement
Dominant language
Java
Stars
81.5k
Forks
42.7k
Avg merge
2d 4h
Merged PRs (30d)
65

Description

All Spring Boot (actually all Spring projects, but let us start with Boot) modules should be collected in a dedicated Spring Boot BOM that is then cross-references by every module. This would in turn ensure consistent resolution of all dependencies within a dependency tree. Well, at least on Gradle. According to @wilkinsona this does not work in Maven, I do not know, but even if it is Gradle only it is providing substantial value.

Screenshot 2022-09-16 at 22 16 22

This screenshot illustrates consistent resolution of Jackson dependencies. This is made possible by the Jackson developers because they cross-reference their own BOM in every module of theirs, e.g.:

https://github.com/FasterXML/jackson-annotations/blob/082ee2812f0a7019516181947e591d8ed624425a/pom.xml#L129-L137

The same is possible in Gradle, example build setup:

project(":bom") {
    apply<JavaPlatformPlugin>()
    dependencies {
        constraints {
            api(project(":a"))
            api(project(":b"))
        }
    }
}

project(":a") {
    apply<JavaLibraryPlugin>()
    dependencies {
        api(platform(project(":bom")))
    }
}

project(":b") {
    apply<JavaLibraryPlugin>()
    dependencies {
        api(platform(project(":bom")))
    }
}

I am happy to help with this if there is interest.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the existing module and dependency-management setup, then compare it with the Gradle Java platform example in the issue. Determine how a dedicated Spring Boot BOM could be cross-referenced by each module and verify consistent dependency resolution; done means the approach works for the supported Gradle build without disrupting other dependency management.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.