Skip to content

spring-boot-resttestclient is missing test scope in spring-cloud-gateway-proxyexchange-webmvc #4256

Description

@timpeeters

Describe the bug
spring-cloud-gateway-proxyexchange-webmvc declares org.springframework.boot:spring-boot-resttestclient without a scope, so it defaults to compile and leaks onto the compile/runtime classpath of every
application that depends on the module.

It is only used by tests — RestTestClient appears in src/test/java and nowhere in src/main/java.
Every other module in the repo already scopes it to test (spring-cloud-gateway-server-webmvc,
spring-cloud-gateway-server-webflux, spring-cloud-gateway-proxyexchange-webflux), so this module
looks like an oversight.

Sample
mvn dependency:tree on a project depending on spring-cloud-gateway-proxyexchange-webmvc shows
spring-boot-resttestclient under compile. Adding <scope>test</scope> to the dependency fixes it;
the module's tests still pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions