Switch default resolver transport from JDK/methanol to Apache HttpClient#12338
Merged
Conversation
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>
Member
|
@gnodet bundle re-declares it, so it needs to be removed as well |
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>
cstamas
reviewed
Jun 22, 2026
| mergedProps.getOrDefault(Constants.MAVEN_RESOLVER_TRANSPORT, MAVEN_RESOLVER_TRANSPORT_DEFAULT); | ||
| if (MAVEN_RESOLVER_TRANSPORT_DEFAULT.equals(transport)) { | ||
| // The "default" mode (user did not set anything) from now on defaults to AUTO | ||
| // Default transport is Apache HTTP client; JDK transport available via -Dmaven.resolver.transport=jdk |
Member
There was a problem hiding this comment.
This is wrong. You just removed jdk transport, so it is not available via....
cstamas
reviewed
Jun 22, 2026
| request.setLocalRepository(getLocalRepository()); | ||
|
|
||
| // native | ||
| // default (no property set) should select Apache |
Member
There was a problem hiding this comment.
No need to do anything, JDK is not on classpath, hence apache is default.
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>
cstamas
approved these changes
Jun 22, 2026
gnodet
added a commit
that referenced
this pull request
Jun 23, 2026
…ent (#12338) (#12341) * 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. * 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. * 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>
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.
Summary
NullPointerException: Inflater has been closed)maven-resolver-transport-jdkfrom the distribution entirely, making Apache HttpClient the only bundled HTTP transportChanges
apache-maven/pom.xml: removedmaven-resolver-transport-jdkdependency from the distribution; updated comment ontransport-apacheto reflect it is now the defaultimpl/maven-cli/pom.xml: switchedmvnupdependency fromtransport-jdktotransport-apacheAbstractUpgradeStrategy(mvnup): switched DI provider fromJdkTransporterFactorytoApacheTransporterFactoryMavenITmng7470ResolverTransportTest: default transport test now expectsApacheTransporterlog snippet; removedtestResolverTransportJdktest (JDK transport no longer shipped)Notes
DefaultRepositorySystemSessionFactoryis not changed — the"default"transport mode still falls through toauto, which selects the highest-priority available transport. Sincetransport-jdkis no longer on the classpath, auto now resolves to Apache HttpClient.-Dmaven.resolver.transport=jdkwill fail at runtime since the transport is no longer bundled.Test plan
MavenITmng7470ResolverTransportTest— default transport now logsApacheTransporter🤖 Generated with Claude Code