spring-boot icon indicating copy to clipboard operation
spring-boot copied to clipboard

Log a warning at build-time when a deprecated starter is used

Open philwebb opened this issue 5 months ago • 3 comments

We need to find a way to deprecate starters and let the users know. Probably using the build plugins.

spring-boot-starter-oauth2-authorization-server -> spring-boot-starter-security-oauth2-authorization-server spring-boot-starter-oauth2-client -> spring-boot-starter-security-oauth2-client spring-boot-starter-oauth2-resource-server -> spring-boot-starter-security-oauth2-resource-server spring-boot-starter-web-services -> spring-boot-starter-webservices spring-boot-starter-web -> spring-boot-starter-webmvc

philwebb avatar Jul 24 '25 06:07 philwebb

Would it help to also use Maven Relocation Support?

mdeinum avatar Jul 24 '25 09:07 mdeinum

A resolution rule for Gradle I think, there are many listed on Using Resolution Rules.

Could outright replace it for users with Module Replacement:

dependencies {
    modules {
        module("org.springframework.boot:spring-boot-starter-web") {
            replacedBy("org.springframework.boot:spring-boot-starter-webmvc", "spring-boot-starter-web is deprecated")
        }
    }
}

ciscoo avatar Jul 24 '25 12:07 ciscoo

I just stumbled upon this, Maven Relocation would be really appreciate to make it easier to discover this change in the IDE.

knoobie avatar Dec 04 '25 09:12 knoobie