Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BOM generation. #1569

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Add BOM generation. #1569

wants to merge 3 commits into from

Conversation

vbabanin
Copy link
Member

@vbabanin vbabanin commented Nov 28, 2024

This PR introduces a Bill of Materials (BOM) to improve dependency version management, ensure compatibility, and prevent conflicts caused by transitive dependencies.

Motivation

  • Resolves issues, where mismatched versions cause runtime conflicts.
  • Simplifies the management of transitive dependencies by centralizing version control.

Changes

  • Addition of a :bom module in settings.gradle.
  • Updates in gradle/publish.gradle to configure publishing, signing, and Java platform for BOM projects.
  • Addition of bom/build.gradle.kts file to define BOM configurations.

A BOM defines compatible versions of mongodb-driver-sync, mongodb-driver-core, and related components.
Importing the BOM into the dependencyManagement section ensures consistent versions across the dependency tree and eliminates mismatches.

Example of usage in Maven:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.mongodb</groupId>
            <artifactId>mongodb-driver-bom</artifactId>
            <version>5.3.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

JAVA-3808

@vbabanin vbabanin changed the title Add BOM generation for Java, Kotlin and Scala. Add BOM generation. Nov 29, 2024
@vbabanin vbabanin self-assigned this Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant