Repository navigation
Make jcl-over-slf4j an optional dependency of transport-apache - #2231
Merged
Merged
Conversation
slachiewicz
marked this pull request as ready for review
October 31, 2026 09:00
A library should not choose the JCL implementation for its consumers: the transitive bridge clashed with commons-logging on plugin classpaths. The Maven distribution declares jcl-over-slf4j itself; the suppliers now declare it too. Do not make it transitive again.
slachiewicz
force-pushed
the
agent/jcl-over-slf4j-optional
branch
from
October 31, 2026 09:12
3d876da to
9531c73
Compare
gnodet-bot
approved these changes
Oct 31, 2026
gnodet-bot
left a comment
Contributor
There was a problem hiding this comment.
LGTM. The fix is correct: making jcl-over-slf4j optional in transport-apache, adding it explicitly to both suppliers, and managing its version through the BOM are all consistent with the project's established pattern for slf4j artifacts.
The downstream impact on maven-testing and maven-cli (which depend on transport-apache directly) is properly documented in the PR body — those modules will need an explicit JCL dep, but that is an expected and acceptable consequence of this change.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
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.
Fixes #2174.
maven-resolver-transport-apacheno longer passesjcl-over-slf4jon to its consumers. Throughmaven-core(provided) it reached plugin classpaths next tocommons-loggingand trippedbanDuplicateClasses. The application now picks the JCL implementation:jcl-over-slf4jinapache-maven/pom.xml(3.10.x and master), solib/keeps the same content.maven-resolver-supplier-mvn3and-mvn4declare it themselves, so supplier users see no change.NoClassDefFoundError: org/apache/commons/logging/LogFactoryand must addjcl-over-slf4jorcommons-logging1.3+. Maven 4'smaven-testingandmaven-clidepend on transport-apache directly, so they may want the same explicit dependency.Verified: a consumer of transport-apache plus
commons-logging:1.3.5,mvn dependency:list→ onlycommons-loggingprovidesorg.apache.commons.logging.