[
https://issues.apache.org/jira/browse/HTTPCLIENT-1985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16821779#comment-16821779
]
Sergey Chernov commented on HTTPCLIENT-1985:
--------------------------------------------
Hello, [~elyograg]
{quote}The reason that HttpComponents is broken up into separate projects is so
that each API can be independently maintained.
{quote}
I got your point, but it seems that you argue from the apache community
developer position, not the final user of the library.
{quote}If your project needs core http APIs but does not need an actual client,
you won't need to include everything.
{quote}
These components are tightly coupled and for generic user they are "the same",
so the final user needs just a working client, that's it.
Regarding your list of spring dependencies - it consists packages (groupId):
* org.springframework.boot (should have single version A)
* org.springframework.security (should have single version B)
* org.springframework (should have single version C)
* org.springframework.data (should have single version D)
That's true, each of the mentioned four packages have separate versions for the
same reason - different teams that maintain it. But each of this projects is a
huge framework that contains a dozen of artifactIds. Please note, that inside
of a single groupId the version of artifact is exactly the same - this makes
sense.
In opposite, the org.apache.httpcomponents is a single groupId, but inside of
this group each artifact has own dependency version, that is confusing.
Well, I see that in version 5 each repo has own groupId, that is already
better. But anyway all httpcomponents artifacts is a single "monolith" of
tightly coupled modules.
In case of a single version the dependency management for parent pom can just
look like (in case of single groupId org.apache.httpcomponents5):
{code}
<httpcomponents5.version>5.0.0</httpcomponents5.version>
<dependency>
<groupId>org.apache.httpcomponents5</groupId>
<artifactId>httpclient</artifactId>
<version>${httpcomponents5.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents5</groupId>
<artifactId>httpcore</artifactId>
<version>${httpcomponents5.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents5</groupId>
<artifactId>httpcore-h2</artifactId>
<version>${httpcomponents5.version}</version>
</dependency>
...
{code}
And for final user it should be clear which version to add to the project.
Again, please consider not a sterile Spring Initializr bootstrapped project
with clear and simple dependency management, but the "reality": complicated old
legacy project with hundred of dependencies that have it's own transitive
dependencies - it easily becomes a hell that ends up broken production
environment (even if integration tests are fine).
cc [~david_syer], [~awilkinson]
> Single version for httpcore, httpclient, httpasyncclient
> --------------------------------------------------------
>
> Key: HTTPCLIENT-1985
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1985
> Project: HttpComponents HttpClient
> Issue Type: Wish
> Components: HttpClient (async), HttpClient (classic)
> Affects Versions: 5.0 Beta4
> Reporter: Sergey Chernov
> Priority: Major
> Original Estimate: 96h
> Remaining Estimate: 96h
>
> Probably this topic was discussed in the mailing list, but I could not find
> it.
> Anyway, the problem is that there is at least three repos with 3 groups of
> artifacts: core, client, asyncclient, each group has its own version.
> The site instruction says: just import
> "org.apache.httpcomponents:httpclient:${httpclient.version}" and be happy
> (simplified).
> But in fact in a complicated project with big count of dependencies including
> dozens of artifacts, there can easily be a jar hell with incompatible
> versions of artifacts.
> If you are good with maven, you understand the power of dependencyManagement
> or even have a spring-boot-dependencies parent
> https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-dependencies/pom.xml
> for the project.
> Which version of httpasyncclient should you choose if you already have
> httpclient of version A and httpcore of version B (that can vary in different
> modules of the multi-module maven project)?
> You have to find a compatible version with core or update everything. Again,
> you have to understand all these details or just voodoo unless success (that
> can break application runtime of course).
> It's hard to imagine how many applications and developers suffered because of
> it.
> I suppose the main reason for this decision was not to release the artifact
> that is not updated. But it brings more evil, than good.
> Whatever, I hoped that new generation of the http client will unite all three
> repos to one with single version. Like kotlin, spring-framework, spring-boot
> or netty. But it's not.
> Why? It's not yet too late before the client 5 is released.
> I bet spring-boot developers will support this idea :D
> Sorry, if it was discussed in the mailing lists or if I should post it there.
> Please let me know what you think.
> Thanks in any case.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]