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

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


The following commit(s) were added to refs/heads/master by this push:
     new f6c51799d9 [#14019] Use Commons Logging in Maven Core and the CLI 
(master backport) (#14136)
f6c51799d9 is described below

commit f6c51799d93ab6733eaa56b0dc1e187d2b5cb954
Author: Guillaume Nodet <[email protected]>
AuthorDate: Fri Nov 27 18:38:31 2026 +0100

    [#14019] Use Commons Logging in Maven Core and the CLI (master backport) 
(#14136)
    
    Port of #14110 (merged to maven-3.10.x) to master.
    
    Replace jcl-over-slf4j with commons-logging:1.4.0 in:
    - compat/maven-resolver-provider: direct runtime dependency
    - apache-maven: CLI distribution, excluding the bridge from wagon-http
    
    Manage commons-logging:1.4.0 centrally in root POM and ban
    jcl-over-slf4j (compile/runtime scopes) via the existing Enforcer
    rule to prevent regression.
---
 apache-maven/pom.xml                   | 13 +++++++++----
 compat/maven-resolver-provider/pom.xml |  4 ++--
 pom.xml                                | 11 ++++++++++-
 src/graph/ReactorGraph.java            |  2 +-
 4 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index 4dbe388366..874115f6b1 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -62,6 +62,12 @@ under the License.
     <dependency>
       <groupId>org.apache.maven.wagon</groupId>
       <artifactId>wagon-http</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>jcl-over-slf4j</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.wagon</groupId>
@@ -69,11 +75,10 @@ under the License.
     </dependency>
 
     <!-- CLI -->
-    <!-- bridge from Apache Commons Logging (JCL) to SLF4J-->
+    <!-- Apache Commons Logging routes JCL calls through Maven's SLF4J logger 
-->
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>jcl-over-slf4j</artifactId>
-      <version>${slf4jVersion}</version>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
       <scope>runtime</scope>
     </dependency>
     <!-- Boot classpath: logging API and System.Logger bridge (placed in 
boot/) -->
diff --git a/compat/maven-resolver-provider/pom.xml 
b/compat/maven-resolver-provider/pom.xml
index ea4b25a8ca..8ac868bedd 100644
--- a/compat/maven-resolver-provider/pom.xml
+++ b/compat/maven-resolver-provider/pom.xml
@@ -108,8 +108,8 @@ under the License.
       <artifactId>maven-resolver-transport-apache</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>jcl-over-slf4j</artifactId>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
       <scope>runtime</scope>
     </dependency>
 
diff --git a/pom.xml b/pom.xml
index 90900f53ff..0d388c76c9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -162,6 +162,7 @@ under the License.
     <resolverVersion>2.0.26</resolverVersion>
     <securityDispatcherVersion>4.3.0</securityDispatcherVersion>
     <sisuVersion>1.1.0</sisuVersion>
+    <commonsLoggingVersion>1.4.0</commonsLoggingVersion>
     <slf4jVersion>2.0.20</slf4jVersion>
     <stax2ApiVersion>4.3.2</stax2ApiVersion>
     <wagonVersion>3.5.3</wagonVersion>
@@ -539,6 +540,11 @@ under the License.
         <artifactId>jcl-over-slf4j</artifactId>
         <version>${slf4jVersion}</version>
       </dependency>
+      <dependency>
+        <groupId>commons-logging</groupId>
+        <artifactId>commons-logging</artifactId>
+        <version>${commonsLoggingVersion}</version>
+      </dependency>
 
       <!--  Wagon -->
       <dependency>
@@ -962,8 +968,11 @@ under the License.
                   <excludes>
                     
<exclude>org.sonatype.plexus:plexus-sec-dispatcher</exclude>
                     <exclude>org.sonatype.plexus:plexus-cipher</exclude>
+                    <!-- ban jcl-over-slf4j in compile/runtime scopes; test 
scope is allowed -->
+                    <exclude>org.slf4j:jcl-over-slf4j:*:jar:compile</exclude>
+                    <exclude>org.slf4j:jcl-over-slf4j:*:jar:runtime</exclude>
                   </excludes>
-                  <message>ensure no more org.sonatype.plexus:plexus-cipher 
and org.sonatype.plexus:plexus-sec-dispatcher.</message>
+                  <message>ensure no more org.sonatype.plexus:plexus-cipher, 
org.sonatype.plexus:plexus-sec-dispatcher, or org.slf4j:jcl-over-slf4j 
(compile/runtime).</message>
                 </bannedDependencies>
               </rules>
               <fail>true</fail>
diff --git a/src/graph/ReactorGraph.java b/src/graph/ReactorGraph.java
index 1d82169bcd..6c5d3dab8e 100755
--- a/src/graph/ReactorGraph.java
+++ b/src/graph/ReactorGraph.java
@@ -49,7 +49,7 @@ public class ReactorGraph {
         CLUSTER_PATTERNS.put("XML Parsing", 
Pattern.compile("(.*:woodstox-core:.*)|(.*:stax2-api:.*)"));
         CLUSTER_PATTERNS.put("Wagon", 
Pattern.compile("^org\\.apache\\.maven\\.wagon:.*"));
         CLUSTER_PATTERNS.put("SLF4j", Pattern.compile("^org\\.slf4j:.*"));
-        CLUSTER_PATTERNS.put("Commons", Pattern.compile("^commons-cli:.*"));
+        CLUSTER_PATTERNS.put("Commons", 
Pattern.compile("^commons-(cli|logging):.*"));
         CLUSTER_PATTERNS.put("Testing", 
Pattern.compile("^.*:(mockito-core|junit-jupiter-api|junit-platform-commons|opentest4j):.*"));
     }
     private static final Pattern HIDDEN_NODES = 
Pattern.compile(".*:(maven-docgen|roaster-api|roaster-jdt|velocity-engine-core|commons-lang3|asm|logback-classic|slf4j-simple|domtrip-core|domtrip-maven):.*");

Reply via email to