I am following the Spring documentation Using Spring Boot without the parent POM. In my parent POM, I am defining an import dependency on spring-boot-dependencies in the dependenciesManagement section. In my child POM I then define a dependency on spring-boot-starter-jersey, not specifying any version. When I look at the dependency:tree, I see that all the jersey dependencies use the version specified in spring-boot-dependencies. All is well.
Now, in my child POM, I need to add another jersey dependency. In the spring-boot-dependencies POM, I see that a property jersey.version is defined. However, when I use ${jersey.version} in my child POM, the property is not defined.
Why is ${jersey.version} not available in the child POM?
Parent POM snippet:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.5.0.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Child POM snippet:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-sse</artifactId>
<version>${jersey.version}</version> <!-- error here -->
</dependency>
</dependencies>
From spring-boot-dependencies-1.5.0.RELEASE.pom:
<properties>
<jersey.version>2.25.1</jersey.version>
</properties>