Skip to content

Spring 6+ upgrades trigger migration to HttpClient 5 – how to deal with undeclared dependency on HttpClient 4? #35

@timtebeek

Description

@timtebeek

Discussed in openrewrite/rewrite#4584

Originally posted by @DidierLoiseau October 16, 2024
I noticed an issue with this migration, which is triggered transitively by Spring Boot 3+ upgrades since openrewrite/rewrite-spring#566: HttpClient 4 is a relatively common dependency, so people often use it without even realizing it is pulled transitively by another dependency, and they don’t declare HttpClient as an explicit dependency.

The problem with this migration is that it will update the code without adding the HttpClient 5 dependency if HttpClient 4 was missing.

Is there a way around this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Recipes Wanted

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions