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.
Describe the bug
spring-cloud-gateway-proxyexchange-webmvcdeclaresorg.springframework.boot:spring-boot-resttestclientwithout a scope, so it defaults tocompileand leaks onto the compile/runtime classpath of everyapplication that depends on the module.
It is only used by tests —
RestTestClientappears insrc/test/javaand nowhere insrc/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 modulelooks like an oversight.
Sample
mvn dependency:treeon a project depending onspring-cloud-gateway-proxyexchange-webmvcshowsspring-boot-resttestclientundercompile. Adding<scope>test</scope>to the dependency fixes it;the module's tests still pass.