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?
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.
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.
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.
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.
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With