Questions tagged [maven-bom]

Maven BOM (bill of materials) is a pattern for collectively managing the versions of multiple dependencies into your project.

For Maven based project which have several artifacts which don't follow single versioning schema vendors may supply recommended dependency via prepared dependency file in dependencyManagement section.

Refer to official docs for example.

Common example of Maven BOM supplied by Spring project:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-framework-bom</artifactId>
            <version>${spring.version}</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-releasetrain</artifactId>
            <version>${spring-data.version}</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-bom</artifactId>
            <version>${spring-security.version}</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
    </dependencies>
</dependencyManagement>
95 questions
0
votes
2 answers

Maven dependency BOM camel-spring-boot-bom not working with Gradle

I'm trying to get the Apache Camel Spring Boot BOM working. However, it does neither work by specifying it as a dependency with dependencies { implementation platform("org.apache.camel.springboot:camel-spring-boot-bom:${camelVersion}") . . …
Marian Klühspies
  • 15,824
  • 16
  • 93
  • 136
0
votes
1 answer

Accessing a property from a management pom

In our project, we use a dependency-management pom which is imported into another maven project's pom. The dependency management pom has some properties. Is there a way to access the properties from the dependency management pom? Also, I looked at…
John
  • 272
  • 1
  • 3
  • 12
0
votes
0 answers

Create a BOM file

I have a Maven-based multi-module Java project that builds a number of jar files (libraries) for use by other applications. There are 5 modules in this project, each creating a separate jar file. They all have the same version number. I would like…
k314159
  • 5,051
  • 10
  • 32
0
votes
2 answers

How to use Spring Boot BOM, instead of parent?

I need to use BOMs in my project, so simplify the task of managing dependencies. This is the requirement, I cannot pivot at this stage. I removed parent spring-boot and added AWS, Spring Boot and Junit5 as BOMs. The issue is, even though I have…
Dmytro Chasovskyi
  • 3,209
  • 4
  • 40
  • 82
0
votes
1 answer

'parent.relativePath' of imported bill-of materials POM creating warning in Eclipse

Note that this question is about a parent.relativePath warning in an imported bill-of-materials (BOM), not in the hierarchy of my own POM as with 'parent.relativePath' points at my com.mycompany:MyProject instead of org.apache:apache - Why?. In…
Garret Wilson
  • 18,219
  • 30
  • 144
  • 272
0
votes
0 answers

Automatically import nested BOMs version numbers in java project

I have a parent platform BOM like this: 4.0.0 com.company platform-bom 7.0.LTS.9 pom
0
votes
1 answer

in springboot multimodule project, adding BOM as dependency

I have multiple dependencies. so I created a separate maven project with dependencies. Dependency DA 0.0.1-SNAPSHOT pom
santro
  • 373
  • 1
  • 6
  • 22
0
votes
0 answers

Download BOM without explicitly adding in pom file

Is there any way to download a BOM file without explicitly adding the BOM file dependency in pom file? I would like to avoid addition of bom dependencies in my pom files. But the latest versions of TPP jars like Spring, CXF seem to have a dependency…
Mounika
  • 11
  • 3
0
votes
1 answer

maven how to automaticaly apply plugin from another artifact to project

I have to setup many maven projects having almost the same structure, same dependencies and same plugins. So i decided to create a bom containing all my common dependencies. So my all other projects include this bom (by inheritance or import). I…
soung
  • 1,411
  • 16
  • 33
0
votes
1 answer

kotlin-bom for maven plugin

I'm trying to use kotlin-bom to keep consistent versions for everything in my single-module maven project. I've got this in my pom.xml:
k314159
  • 5,051
  • 10
  • 32
0
votes
1 answer

How to use kotlin-bom

I have a single-module maven project which uses a number of Kotlin libraries, and I'm trying to specify the kotlin-bom to ensure they all use the same version. I've got the following in my pom.xml:
k314159
  • 5,051
  • 10
  • 32
0
votes
1 answer

Is there a way to use version of dependency declared in Spring Boot BOM

I have a Gradle-based project with root build.gradle declaring dependency on Spring Boot BOM: ext { springBootVersion = '2.6.3' } subprojects { dependencies { implementation…
Sergey Tsypanov
  • 3,265
  • 3
  • 8
  • 34
0
votes
0 answers

Maven parent - sharing bom dependencies with child artefacts

I have several Maven artefacts, who are all children of a parent which is used to centralise versions of dependencies in use. For example, apple and pear are both children of maven-parent. maven-parent defines version 3.12.0 of commons-lang3 and…
Jakg
  • 922
  • 12
  • 39
0
votes
1 answer

Updating 100s of microservices on parent POM change

I have 100s of microservices, we are trying to introduce the BOM in our project. 1 issue I can clearly see is, if I update the BOM, we need to make changes to all the microservices. Is there a better way to do this? Example: grandparent:1.0.0 `--…
Gagan
  • 137
  • 1
  • 13
0
votes
1 answer

Maven parent POM issue

I have a parent POM that, I have used in my other project for dependency management. When I build my child project at that time, it will check in my repository to get parent pom. But at the same time is going to check for the maven central as well.…
CHiRAG
  • 222
  • 4
  • 15