You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2022/12/08 01:48:35 UTC
[james-project] branch 3.7.x updated: JAMES-3862: Switch to SLF4J 2.0.x compatible Log4j Adapter. Copy log4j-core dependency jar to appassembler lib dir. (#1333) (#1335)
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch 3.7.x
in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/3.7.x by this push:
new c5763276be JAMES-3862: Switch to SLF4J 2.0.x compatible Log4j Adapter. Copy log4j-core dependency jar to appassembler lib dir. (#1333) (#1335)
c5763276be is described below
commit c5763276be244f0af181f98fe10dd2ca430b7e73
Author: Benoit TELLIER <bt...@linagora.com>
AuthorDate: Thu Dec 8 08:48:29 2022 +0700
JAMES-3862: Switch to SLF4J 2.0.x compatible Log4j Adapter. Copy log4j-core dependency jar to appassembler lib dir. (#1333) (#1335)
Co-authored-by: Bernd Bartke <bb...@users.noreply.github.com>
---
pom.xml | 12 ++++++++----
server/apps/spring-app/pom.xml | 28 +++++++++++++++++++++++++++-
server/container/spring/pom.xml | 5 ++---
3 files changed, 37 insertions(+), 8 deletions(-)
diff --git a/pom.xml b/pom.xml
index e702cccfb3..1b79248be5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -592,7 +592,7 @@
<apache-mime4j.version>0.8.7</apache-mime4j.version>
<apache.openjpa.version>3.2.0</apache.openjpa.version>
<derby.version>10.14.2.0</derby.version>
- <log4j2.version>2.17.1</log4j2.version>
+ <log4j2.version>2.19.0</log4j2.version>
<javax.inject.version>1</javax.inject.version>
<javax.activation.groupId>javax.activation</javax.activation.groupId>
<javax.activation.artifactId>activation</javax.activation.artifactId>
@@ -2556,13 +2556,17 @@
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j</artifactId>
+ <artifactId>log4j-api</artifactId>
+ <version>${log4j2.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
<version>${log4j2.version}</version>
- <type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
+ <artifactId>log4j-slf4j2-impl</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
diff --git a/server/apps/spring-app/pom.xml b/server/apps/spring-app/pom.xml
index 4efe4077ef..7bcd9057f0 100644
--- a/server/apps/spring-app/pom.xml
+++ b/server/apps/spring-app/pom.xml
@@ -506,9 +506,18 @@
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
+ <artifactId>log4j-api</artifactId>
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j2-impl</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-spring</artifactId>
@@ -850,6 +859,23 @@
</execution>
</executions>
</plugin>
+ <!-- Copy runtime dependency log4j-core to appassembler/lib -->
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <configuration>
+ <includeArtifactIds>log4j-core</includeArtifactIds>
+ <includeScope>runtime</includeScope>
+ <outputDirectory>${project.build.directory}/appassembler/lib</outputDirectory>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <phase>prepare-package</phase>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
diff --git a/server/container/spring/pom.xml b/server/container/spring/pom.xml
index 226b94eac7..f2d805d2f0 100644
--- a/server/container/spring/pom.xml
+++ b/server/container/spring/pom.xml
@@ -157,12 +157,11 @@
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j</artifactId>
- <type>pom</type>
+ <artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
+ <artifactId>log4j-slf4j2-impl</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org