I have a project, where I use spring-cloud-starter-stream-rabbit
. But our devOps team asked me why I'm using spring-web
. I've figured out that spring-web goes exactly from spring-cloud-starter-stream-rabbit. But there is no version defined:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
I've started to look in parent projects. But with no result. pom hierarchy
I go from bottom to top:
spring-cloud-stream-binder-rabbit-core.pom
spring-cloud-stream-binder-rabbit-parent.pom
Surprisingly I cant find version there. I thought maybe this versions goes from other dependencies. Created project with single dependency like this
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>example</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
<version>3.1.2</version>
</dependency>
</dependencies>
</project>
But mvn dependency:list
showed:
...
[INFO] com.fasterxml:classmate:jar:1.3.4:compile
[INFO] org.springframework:spring-web:jar:5.3.4:compile
[INFO] javax.annotation:javax.annotation-api:jar:1.3.2:compile
...
Wow! Where is that secret place where maven gets version for spring-web? If you know please help.
Thanks for support!