Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Whats the difference between spring-framework-bom and platform-bom?

Tags:

spring

maven

Ive been experimenting with Spring BOM and note there are two build managers - spring-framework-bom and platform-bom

<dependencyManagement>
    <dependencies>
            <dependency> 
                <groupId>org.springframework</groupId> 
                <artifactId>spring-framework-bom</artifactId> 
                <version>${spring.version}</version> 
                <type>pom</type> 
                <scope>import</scope> 
            </dependency> 
        </dependencies> 
</dependencyManagement>

Or

<dependencyManagement>
     <dependencies>
        <dependency>
            <groupId>io.spring.platform</groupId>
            <artifactId>platform-bom</artifactId>
            <version>1.1.2.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Whats the difference? Or has spring-framework-bom been superceded? Personally I prefer the spring-framework-bom approach as i can control the spring version?

like image 802
farrellmr Avatar asked Jun 04 '15 13:06

farrellmr


People also ask

What is platform BOM?

Using the Platform Bill of Materials (BOM) Both Gradle 1 and Maven 2 define a mechanism that developers can leverage to align the versions of dependencies that belong to the same framework, or an umbrella of dependencies that need to be aligned to work well together.

What is BOM Spring?

A BOM is a special kind of POM that is used to control the versions of a project's dependencies and provide a central place to define and update those versions. BOM provides the flexibility to add a dependency to our module without worrying about the version that we should depend on.

What comes under Springcore?

The Spring Framework consists of features organized into about 20 modules. These modules are grouped into Core Container, Data Access/Integration, Web, AOP (Aspect Oriented Programming), Instrumentation, Messaging, and Test, as shown in the following diagram.

What is Maven BOM in gradle?

Maven's dependency management includes the concept of a bill-of-materials (bom). A bom is a special kind of pom that is used to control the versions of a project's dependencies and provides a central place to define and update those versions.


1 Answers

I had a hunt around on this question last week, and as M Deinum has stated the difference is that spring-framework-bom is just for the framework. I then raised an issue that how can i control the spring version if using platform-bom.

The answer is to check the spring boot dependencies project for spring version -

https://github.com/spring-projects/spring-boot/blob/master/spring-boot-dependencies/pom.xml

A summary of versions are -

Spring Platform BOM Version Spring Version 1.1.2.RELEASE 4.2.0.RC1
1.1.0.RELEASE 4.1.3.RELEASE 1.0.0.RELEASE 4.0.5.RELEASE

Reference -

https://glenware.wordpress.com/2015/06/05/spring-bom-bill-of-materials/

like image 68
farrellmr Avatar answered Oct 15 '22 03:10

farrellmr