Repository navigation
Description
Affected version
3.10.1
Bug description
Title
jcl-over-slf4j is still exposed through Maven Core's Resolver compatibility path
Description
The changes intended to remove jcl-over-slf4j from Maven's exposed dependencies have not actually eliminated it from the Maven runtime.
Although the dependency was made optional in Resolver, Maven Core subsequently reintroduced it through the Maven 3.10.1 compatibility code. As a result, the bridge is still present in the effective runtime dependency graph and continues to leak through Maven Core.
See example using enforcer to block jcl-over-slf4j from maven-core within a maven plugin.
ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.6.3:enforce (enforce-clean) on project coveralls-maven-plugin:
[ERROR] Rule 0: org.apache.maven.enforcer.rules.dependency.BannedDependencies failed with message:
[ERROR] Do not use obsolete logging libraries. Prefer slf4j/logback and override slf4j libraries for replacements. Use only commons-logging when needed and no overrides from any of the major logging providers.
[ERROR] com.github.hazendaz.maven:coveralls-maven-plugin:maven-plugin:5.1.1-SNAPSHOT
[ERROR] org.apache.maven:maven-core:jar:3.10.1
[ERROR] org.apache.maven:maven-resolver-provider:jar:3.10.1
[ERROR] org.slf4j:jcl-over-slf4j:jar:2.0.20 <--- banned via the exclude/include list
This defeats the original objective of removing the dependency. Making it optional in one location does not solve the problem if Maven Core brings it back through another path.
Proposed direction
My original recommendation was to move away from jcl-over-slf4j rather than simply hide or make the dependency optional.
Commons Logging already provides the appropriate logging abstraction and delegation mechanism, and moving to it would avoid carrying the additional JCL-to-SLF4J bridge. It also offers a better-performing approach than retaining the bridge.
I would strongly prefer addressing the underlying logging dependency arrangement rather than continuing to add compatibility-specific exceptions that reintroduce the dependency.
Expected outcome
jcl-over-slf4jshould no longer be present in Maven Core's effective runtime dependency graph.- Resolver's Maven 3.10.1 compatibility code should not reintroduce the dependency.
- The original logging migration should be completed consistently across Maven Core and Resolver.
- Verify the actual Maven distribution/runtime dependencies, rather than checking only whether the dependency is optional or absent from an individual POM.
The current implementation gives the appearance of having removed the dependency while retaining it in the actual runtime. That is not a completed migration.
Activity
harshab054 commentedon Nov 17, 2026
I investigated the dependency leak in Maven 3.10.1 and confirmed that "maven-resolver-provider" exposes "jcl-over-slf4j" as a non-optional runtime dependency.
Resolver 2.0.25 already marks this dependency optional, with the expectation that the application provides a JCL implementation. Making it optional in Maven's provider POM removes it from downstream consumers' dependency trees while preserving it on the provider's own test classpath.
I also verified that Apache HttpClient 4.5.14 requires the JCL API, and that "commons-logging:1.3.4" can provide that API while delegating logging to SLF4J.
There seem to be two possible scopes:
Which direction would you prefer? I would like to align the fix with the intended scope before submitting a revised PR.
cstamas commentedon Nov 17, 2026
Anyone care to make a PR for upcoming 3.10.2? (don't forget to test with Resolver 2.0.26-SNAPSHOT)