Skip to content

Commit ee5ac6b

Browse files
committedDec 22, 2023
Workaround Coursier/Ivy dependency resolution bug
Workaround a Coursier/Ivy dependency resolution bug that affects `log4j-slf4j-impl` and `log4j-mongodb3`. This bug also affects popular sites like MvnRepository (cf. [`log4j-mongodb3:2.22.0`](https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-mongodb3/2.22.0)). Closes #2065
1 parent 2d53d98 commit ee5ac6b

File tree

3 files changed

+58
-1
lines changed

3 files changed

+58
-1
lines changed
 

‎log4j-mongodb3/pom.xml

+27
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,33 @@
4242
<mongodb.version>3.12.11</mongodb.version>
4343
</properties>
4444

45+
<!-- Use explicit versions as a temporary workaround to a Coursier/Ivy bug:
46+
https://github.com/apache/logging-log4j2/issues/2065 -->
47+
<dependencyManagement>
48+
<dependencies>
49+
<dependency>
50+
<groupId>org.mongodb</groupId>
51+
<artifactId>bson</artifactId>
52+
<version>${mongodb.version}</version>
53+
</dependency>
54+
<dependency>
55+
<groupId>org.mongodb</groupId>
56+
<artifactId>mongodb-driver-core</artifactId>
57+
<version>${mongodb.version}</version>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.mongodb</groupId>
61+
<artifactId>mongodb-driver-legacy</artifactId>
62+
<version>${mongodb.version}</version>
63+
</dependency>
64+
<dependency>
65+
<groupId>org.mongodb</groupId>
66+
<artifactId>mongodb-driver-sync</artifactId>
67+
<version>${mongodb.version}</version>
68+
</dependency>
69+
</dependencies>
70+
</dependencyManagement>
71+
4572
<dependencies>
4673
<dependency>
4774
<groupId>org.apache.logging.log4j</groupId>

‎log4j-slf4j-impl/pom.xml

+21-1
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828
<name>Apache Log4j SLF4J Binding</name>
2929
<description>The Apache Log4j SLF4J API binding to Log4j 2 Core</description>
3030
<properties>
31+
<slf4j.version>1.7.36</slf4j.version>
3132
<!-- Do not upgrade the SLF4J version. 1.7.26 broke backward compatibility. Users can update the version if
3233
they do not require support for SLF4J's EventData -->
33-
<slf4j.version>1.7.25</slf4j.version>
34+
<slf4j-ext.version>1.7.25</slf4j-ext.version>
3435

3536
<!--
3637
~ OSGi and JPMS options
@@ -46,6 +47,25 @@
4647
org.slf4j;substitute="slf4j-api"
4748
</bnd-extra-module-options>
4849
</properties>
50+
51+
<!-- Use explicit versions as a temporary workaround to a Coursier/Ivy bug:
52+
https://github.com/apache/logging-log4j2/issues/2065 -->
53+
<dependencyManagement>
54+
<dependencies>
55+
<dependency>
56+
<groupId>org.slf4j</groupId>
57+
<artifactId>slf4j-api</artifactId>
58+
<version>${slf4j.version}</version>
59+
</dependency>
60+
<dependency>
61+
<groupId>org.slf4j</groupId>
62+
<artifactId>slf4j-ext</artifactId>
63+
<version>${slf4j-ext.version}</version>
64+
<optional>true</optional>
65+
</dependency>
66+
</dependencies>
67+
</dependencyManagement>
68+
4969
<dependencies>
5070
<dependency>
5171
<groupId>org.osgi</groupId>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://logging.apache.org/log4j/changelog"
4+
xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.2.xsd"
5+
type="fixed">
6+
<issue id="2065" link="https://github.com/apache/logging-log4j2/pull/2065"/>
7+
<description format="asciidoc">
8+
Workaround a Coursier/Ivy dependency resolution bug affecting `log4j-slf4j-impl` and `log4j-mongodb3`.
9+
</description>
10+
</entry>

0 commit comments

Comments
 (0)
Please sign in to comment.