[Backport 4.0.x] Switch default resolver transport from JDK/methanol to Apache HttpClient#12341
Merged
Merged
Conversation
…ent (#12338) * Switch default resolver transport from JDK/methanol to Apache HttpClient The JDK HTTP transport (backed by methanol) has proven flaky on Windows CI due to race conditions in the gzip/inflater code path. Switch the default transport to Apache HttpClient for better stability while keeping JDK transport available via -Dmaven.resolver.transport=jdk. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Remove JDK/methanol transport from the distribution bundle Per review feedback: remove maven-resolver-transport-jdk from apache-maven/pom.xml entirely so it is no longer shipped. Also remove the testResolverTransportJdk integration test since the JAR is no longer bundled. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Revert unnecessary priority overrides — auto selection suffices Since JDK transport is no longer bundled, the auto selection naturally picks Apache as the highest-priority remaining transport. No need to explicitly force priorities in the default case. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #12338 to
maven-4.0.x.Cherry-pick of ffd7baa — conflict resolved in the IT test.
Summary
maven-resolver-transport-jdkfrom the distribution, making Apache HttpClient the only bundled HTTP transportNullPointerException: Inflater has been closed)Changes
apache-maven/pom.xml: removedmaven-resolver-transport-jdkdependency from the distributionimpl/maven-cli/pom.xml: switchedmvnupdependency fromtransport-jdktotransport-apacheAbstractUpgradeStrategy(mvnup): switched DI provider fromJdkTransporterFactorytoApacheTransporterFactoryMavenITmng7470ResolverTransportTest: default transport test now expectsApacheTransporter; removedtestResolverTransportJdktest; simplified version-detection helpers (kept backward compat for oldHttpTransporterclass name)Conflict resolution
The IT test on
maven-4.0.xhas a version-range constructorsuper("[3.9.0,)")and backward-compat logic for the oldHttpTransporterclass name (pre-4.0.0-alpha-9). These were preserved. JDK-specific helpers (isJdkTransportUsable,isJdkTransportPresent) were replaced with a singleisApacheTransportRenamed()method.