'Where are the versions of the other spring modules specified in the pom file of spring-data-redis 2.6.1
Maven novice here. The pom file of the Spring Data Redis module version 2.6.1 can be found at https://repo1.maven.org/maven2/org/springframework/data/spring-data-redis/2.6.1/spring-data-redis-2.6.1.pom. The spring-aop, and a bunch of other Spring modules don't have a version specified in the file, but when I look at the dependence tree, the version is 5.3.15.
So where is the version specified?
Solution 1:[1]
They come from the parent, which is org.springframework.data.build:spring-data-parent:2.6.1. That POM contains a dependencyManagement section:
<properties>
…
<spring>5.3.15</spring>
…
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>${spring}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
…
</dependencies>
</dependencyManagement>
And that spring-framework-bom, called a Bill of Materials (AKA BOM), has all the version of various Spring libraries.
When you import that BOM in your project, the versions listed in its dependencyManagement section become kind of recommendations: they will be used if no other version is specified:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>5.3.15</version>
</dependency>
</dependencies>
…
</dependencyManagement>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
