You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I sometimes have the use case of having to specify the Spring Boot version in certain places, for example when defining plugin dependencies, where the inherited dependency management doesn't work, or as an argument to scripts, or for resource filtering, etc.
Spring Boot doesn't define a property itself, so I have to define one, and since Maven doesn't allow using my property to specify the parent version, I now have two places in my pom that I need to keep in sync:
<?xml version="1.0" encoding="UTF-8"?>
<projectxmlns="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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.1</version> <!-- Can't use property here, must specify version explicitly, must be kept in sync with my property. -->
<relativePath/>
</parent>
<properties>
<spring-boot.version>3.4.1</spring-boot.version> <!-- must be kept in sync with parent version -->
</properties>
<build>
<plugins>
<plugin>
<groupId>some.group</groupId>
<artifactId>some.plugin.artifact</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>${spring-boot.version}</version> <!-- Must specify version, because inherited dependency management doesn't apply here -->
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
Proposal: Define the Spring Boot version in a property in spring-boot-starter-parent (or spring-boot-starter-dependencies). That way I'd have to specify the Spring Boot version only for the parent.
The text was updated successfully, but these errors were encountered:
I sometimes have the use case of having to specify the Spring Boot version in certain places, for example when defining plugin dependencies, where the inherited dependency management doesn't work, or as an argument to scripts, or for resource filtering, etc.
Spring Boot doesn't define a property itself, so I have to define one, and since Maven doesn't allow using my property to specify the parent version, I now have two places in my pom that I need to keep in sync:
Proposal: Define the Spring Boot version in a property in spring-boot-starter-parent (or spring-boot-starter-dependencies). That way I'd have to specify the Spring Boot version only for the parent.
The text was updated successfully, but these errors were encountered: