This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git


The following commit(s) were added to refs/heads/master by this push:
     new 3a755b3fc GH-2174: Make jcl-over-slf4j an optional dependency of 
transport-apache
3a755b3fc is described below

commit 3a755b3fc919061e8290d768fbfa2380ae912783
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Mon Oct 26 12:48:10 2026 +0000

    GH-2174: Make jcl-over-slf4j an optional dependency of transport-apache
    
    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.
---
 maven-resolver-supplier-mvn3/pom.xml    | 7 +++++++
 maven-resolver-supplier-mvn4/pom.xml    | 6 ++++++
 maven-resolver-transport-apache/pom.xml | 5 +++--
 pom.xml                                 | 5 +++++
 4 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/maven-resolver-supplier-mvn3/pom.xml 
b/maven-resolver-supplier-mvn3/pom.xml
index 09735a5e9..dfb742501 100644
--- a/maven-resolver-supplier-mvn3/pom.xml
+++ b/maven-resolver-supplier-mvn3/pom.xml
@@ -129,6 +129,13 @@
       </exclusions>
     </dependency>
 
+    <dependency>
+      <!-- JCL implementation for Apache HttpClient used by transport-apache 
-->
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
diff --git a/maven-resolver-supplier-mvn4/pom.xml 
b/maven-resolver-supplier-mvn4/pom.xml
index ddca4aacc..6b81207ea 100644
--- a/maven-resolver-supplier-mvn4/pom.xml
+++ b/maven-resolver-supplier-mvn4/pom.xml
@@ -139,6 +139,12 @@
       <artifactId>maven-api-core</artifactId>
       <version>${maven4Version}</version>
     </dependency>
+    <dependency>
+      <!-- JCL implementation for Apache HttpClient used by transport-apache 
-->
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+      <scope>runtime</scope>
+    </dependency>
 
     <dependency>
       <groupId>org.slf4j</groupId>
diff --git a/maven-resolver-transport-apache/pom.xml 
b/maven-resolver-transport-apache/pom.xml
index a0c0a26df..f55cbe437 100644
--- a/maven-resolver-transport-apache/pom.xml
+++ b/maven-resolver-transport-apache/pom.xml
@@ -50,7 +50,7 @@
       <version>4.5.14</version>
       <exclusions>
         <exclusion>
-          <!-- using jcl-over-slf4j instead -->
+          <!-- the application provides a JCL implementation, such as 
jcl-over-slf4j -->
           <groupId>commons-logging</groupId>
           <artifactId>commons-logging</artifactId>
         </exclusion>
@@ -77,10 +77,11 @@
       <artifactId>slf4j-api</artifactId>
     </dependency>
     <dependency>
+      <!-- optional: the application picks the JCL implementation (GH-2174) -->
       <groupId>org.slf4j</groupId>
       <artifactId>jcl-over-slf4j</artifactId>
-      <version>${version.slf4j}</version>
       <scope>runtime</scope>
+      <optional>true</optional>
     </dependency>
     <dependency>
       <groupId>javax.inject</groupId>
diff --git a/pom.xml b/pom.xml
index bced5e359..4be9d2975 100644
--- a/pom.xml
+++ b/pom.xml
@@ -304,6 +304,11 @@
         <artifactId>slf4j-nop</artifactId>
         <version>${version.slf4j}</version>
       </dependency>
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>jcl-over-slf4j</artifactId>
+        <version>${version.slf4j}</version>
+      </dependency>
 
       <dependency>
         <groupId>com.google.jimfs</groupId>

Reply via email to