Affects: 6.0.11
Hello Folks,
In the Spring (Spring Web) documentation for HttpComponentsClientHttpRequestFactory it states the below,
NOTE: Requires Apache HttpComponents 5.1 or higher, as of Spring 6.0.
When I look at the code for HttpComponentsClientHttpRequestFactory.java I can also clearly see corresponding imports & references to Apache HttpComponents HTTPClient.
However when I look at Spring Web's (maven) dependency declaration (or its POM) I don't see Apache HttpComponents HTTPClient declared as a dependency.
Shouldn't Apache HttpComponents HTTPClient library be declared at least as an optional dependency (<optional>true</optional>
) of Spring Web?
Note that I do see that it is declared as an optional dependency in the gradle build which may explain how the build works fine.
Could the org.springframework.build.optional-dependencies plugin have a play in this? Or am I missing something?
Note: Here is the stack overflow question that I had asked earlier with more details if needed.
Thanks Muthu
Comment From: bclozel
We removed that information a long time ago in #23234 and #23486. We don't want to publish information that is at best misguiding for developers.
Comment From: softwarebrahma
Thanks @bclozel for the helpful links. I see that #23486 has been closed mentioning it won't be solved.
In addition to all the helpful feedback from @suztomo on #23234 I also think we need some way to capture the fact that an optional module was used to build an artifact (dependency metadata) especially when its quite literally present in the Gradle build. If stating so using the optional tag provided by Maven is not felt as the right way by the team then alternate should be considered & provided.
Having gone through the reasoning provided in the first issue I am wondering, if perhaps Spring Boot Starters might be a better place/mechanism to capture this.
Comment From: softwarebrahma
Thanks @bclozel for the helpful links. I see that #23486 has been closed mentioning it won't be solved.
In addition to all the helpful feedback from @suztomo on #23234 I also think we need some way to capture the fact that an optional module was used to build an artifact (dependency metadata) especially when its quite literally present in the Gradle build. If stating so using the optional tag provided by Maven is not felt as the right way by the team then alternate should be considered & provided.
Having gone through the reasoning provided in the first issue I am wondering, if perhaps Spring Boot Starters might be a better place/mechanism to capture this.
Thanks @bclozel for the helpful links. I see that #https://github.com/spring-projects/spring-framework/issues/23486 has been closed mentioning it won't be solved.
In addition to all the helpful feedback from @suztomo on https://github.com/spring-projects/spring-framework/issues/23234 I also think we need some way to capture the fact that an optional module was used to build an artifact (dependency metadata) especially when its quite literally present in the Gradle build. If stating so using the optional tag provided by Maven is not felt as the right way by the team then alternate should be considered & provided.
Having gone through the reasoning provided in the first issue I am wondering, if perhaps Spring Boot Starters might be a better place/mechanism to capture this.