Skip to content

Commit 4c23edd

Browse files
committed
Update log4j-slf4j2-impl dependencies
1 parent e7ef871 commit 4c23edd

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

log4j-slf4j2-impl/pom.xml

+12-13
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@
7878
<artifactId>log4j-core-test</artifactId>
7979
<scope>test</scope>
8080
</dependency>
81-
<dependency>
82-
<groupId>org.apache.logging.log4j</groupId>
83-
<artifactId>log4j-to-slf4j</artifactId>
84-
<scope>test</scope>
85-
</dependency>
8681
<dependency>
8782
<groupId>org.assertj</groupId>
8883
<artifactId>assertj-core</artifactId>
@@ -116,34 +111,38 @@
116111
<groupId>org.apache.maven.plugins</groupId>
117112
<artifactId>maven-surefire-plugin</artifactId>
118113
<executions>
114+
<!-- Separate test execution to verify that the presence of both:
115+
~ * `log4j-slf4j2-impl` (bridge from SLF4J to Log4j API)
116+
~ * `log4j-to-slf4j` (bridge from Log4j API to SLF4J)
117+
~ does not cause a stack overflow.
118+
-->
119119
<execution>
120120
<id>loop-test</id>
121121
<goals>
122122
<goal>test</goal>
123123
</goals>
124-
<phase>test</phase>
125124
<configuration>
125+
<additionalClasspathDependencies>
126+
<dependency>
127+
<groupId>org.apache.logging.log4j</groupId>
128+
<artifactId>log4j-to-slf4j</artifactId>
129+
<version>${project.version}</version>
130+
</dependency>
131+
</additionalClasspathDependencies>
126132
<includes>
127133
<include>**/OverflowTest.java</include>
128134
</includes>
129135
</configuration>
130136
</execution>
131137
<execution>
132138
<id>default-test</id>
133-
<goals>
134-
<goal>test</goal>
135-
</goals>
136-
<phase>test</phase>
137139
<configuration>
138140
<includes>
139141
<include>**/*Test.java</include>
140142
</includes>
141143
<excludes>
142144
<exclude>**/OverflowTest.java</exclude>
143145
</excludes>
144-
<classpathDependencyExcludes>
145-
<classpathDependencyExcludes>org.apache.logging.log4j:log4j-to-slf4j</classpathDependencyExcludes>
146-
</classpathDependencyExcludes>
147146
</configuration>
148147
</execution>
149148
</executions>

0 commit comments

Comments
 (0)