Skip to content

Spring Web module's Maven POM is missing an (optional) dependency to Apache HttpComponents HTTPClient library (Gradle one does have it) #30943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
softwarebrahma opened this issue Jul 25, 2023 · 3 comments
Labels
status: duplicate A duplicate of another issue

Comments

@softwarebrahma
Copy link

softwarebrahma commented Jul 25, 2023

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

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 25, 2023
@bclozel
Copy link
Member

bclozel commented Jul 25, 2023

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.

@bclozel bclozel added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jul 25, 2023
@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2023
@softwarebrahma
Copy link
Author

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.

@softwarebrahma
Copy link
Author

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 ##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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants