Skip to content

Commit c644005

Browse files
committed
Handle jcl-over-slf4j and commons-logging better
Various dependencies we manage use commons-logging. While SLF4J is preferred these days, it would be disruptive to exclude the commons-logging dependency from all the managed artifacts that depend on it, expecting all downstream consumers to know they should add jcl-over-slf4j manually to their dependencies instead -- especially since commons-logging includes some API not present in jcl-over-slf4j. Better to allow the commons-logging dependencies to appear transitively, and instead exclude jcl-over-slf4j from the one managed dependency (jackrabbit-webdav) we have that (IMHO erroneously) depends on it. Then, downstream projects that want to use jcl-over-slf4j instead can themselves add it and exclude commons-logging. See also: http://www.slf4j.org/legacy.html#jcl-over-slf4j
1 parent a37ac8b commit c644005

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

pom.xml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,7 @@
11371137
<slf4j-jdk14.version>${slf4j.version}</slf4j-jdk14.version>
11381138
<slf4j-nop.version>${slf4j.version}</slf4j-nop.version>
11391139
<slf4j-simple.version>${slf4j.version}</slf4j-simple.version>
1140+
<jcl-over-slf4j.version>${slf4j.version}</jcl-over-slf4j.version>
11401141

11411142
<!-- SnakeYAML - https://bitbucket.org/asomov/snakeyaml -->
11421143
<snakeyaml.version>1.25</snakeyaml.version>
@@ -2941,12 +2942,6 @@
29412942
<groupId>org.apache.httpcomponents</groupId>
29422943
<artifactId>httpclient</artifactId>
29432944
<version>${httpclient.version}</version>
2944-
<exclusions>
2945-
<exclusion>
2946-
<groupId>commons-logging</groupId>
2947-
<artifactId>commons-logging</artifactId>
2948-
</exclusion>
2949-
</exclusions>
29502945
</dependency>
29512946
<dependency>
29522947
<groupId>org.apache.httpcomponents</groupId>
@@ -3410,6 +3405,18 @@
34103405
<groupId>org.apache.jackrabbit</groupId>
34113406
<artifactId>jackrabbit-webdav</artifactId>
34123407
<version>${jackrabbit-webdav.version}</version>
3408+
<exclusions>
3409+
<exclusion>
3410+
<!--
3411+
Conflicts with commons-logging:commons-logging.
3412+
If you depend on jackrabbit-webdav, add either
3413+
commons-logging or jcl-over-slfj to your deps.
3414+
See: http://www.slf4j.org/legacy.html#jcl-over-slf4j
3415+
-->
3416+
<groupId>org.slf4j</groupId>
3417+
<artifactId>jcl-over-slf4j</artifactId>
3418+
</exclusion>
3419+
</exclusions>
34133420
</dependency>
34143421

34153422
<!-- Jackson - https://github.com/FasterXML/jackson -->
@@ -3900,6 +3907,11 @@
39003907
<artifactId>slf4j-simple</artifactId>
39013908
<version>${slf4j-simple.version}</version>
39023909
</dependency>
3910+
<dependency>
3911+
<groupId>org.slf4j</groupId>
3912+
<artifactId>jcl-over-slf4j</artifactId>
3913+
<version>${jcl-over-slf4j.version}</version>
3914+
</dependency>
39033915

39043916
<!-- SnakeYAML - https://bitbucket.org/asomov/snakeyaml -->
39053917
<dependency>

0 commit comments

Comments
 (0)