Skip to content

Commit 1d78f62

Browse files
committed
chore(ci): test slf4j v2.x
1 parent ce0fccd commit 1d78f62

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

pom.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5454

5555
<log4j2.version>2.19.0</log4j2.version>
56+
<log4j2.slf4j.impl.aid>log4j-slf4j-impl</log4j2.slf4j.impl.aid>
5657
<slf4j.version>1.7.36</slf4j.version>
5758
</properties>
5859

@@ -89,7 +90,7 @@
8990
</dependency>
9091
<dependency>
9192
<groupId>org.apache.logging.log4j</groupId>
92-
<artifactId>log4j-slf4j-impl</artifactId>
93+
<artifactId>${log4j2.slf4j.impl.aid}</artifactId>
9394
<version>${log4j2.version}</version>
9495
<scope>test</scope>
9596
</dependency>
@@ -240,6 +241,13 @@
240241
</pluginManagement>
241242
</build>
242243
<profiles>
244+
<profile>
245+
<id>enable-slf4j-2.x</id>
246+
<properties>
247+
<log4j2.slf4j.impl.aid>log4j-slf4j2-impl</log4j2.slf4j.impl.aid>
248+
<slf4j.version>2.0.4</slf4j.version>
249+
</properties>
250+
</profile>
243251
<profile>
244252
<id>enable-ttl-agent-for-test</id>
245253
<build>

scripts/integration_test

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ run_mvn() {
3838
log_then_run ./mvnw -V --no-transfer-progress dependency:tree "$@"
3939
}
4040

41-
########################################
42-
# build with default log4j2 version
43-
########################################
41+
#############################################
42+
# build with default dependency versions
43+
#############################################
4444

4545
run_mvn clean package
4646
run_mvn package -P enable-ttl-agent-for-test
4747

48-
########################################
48+
#############################################
4949
# build with previous log4j2 versions
50-
########################################
50+
#############################################
5151

5252
CURRENT_LOG4J2_MINOR_VERSION=$(
5353
awk -F'</?log4j2\\.version>' '/<log4j2\.version>.*<\/log4j2\.version>/{print $2}' pom.xml |
@@ -63,3 +63,10 @@ for ((minor_version = CURRENT_LOG4J2_MINOR_VERSION - PREVIOUS_LOG4J2_VERSIONS_TE
6363
run_mvn surefire:test -Dlog4j2.version=$log4j2_version
6464
run_mvn dependency:properties surefire:test -P enable-ttl-agent-for-test -Dlog4j2.version=$log4j2_version
6565
done
66+
67+
#############################################
68+
# build with slf4j v2.x
69+
#############################################
70+
71+
run_mvn surefire:test -P enable-slf4j-2.x
72+
run_mvn dependency:properties surefire:test -P enable-ttl-agent-for-test -P enable-slf4j-2.x

0 commit comments

Comments
 (0)