This is an automated email from the ASF dual-hosted git repository.

dacort pushed a commit to branch fix/log4j
in repository https://gitbox.apache.org/repos/asf/incubator-livy.git

commit 35a2a28a614b8555bf0c90ba4e0dc4ded3410ab6
Author: Damon P. Cortesi <[email protected]>
AuthorDate: Wed Dec 28 22:25:03 2022 +0000

    Initial fixes for log4j
---
 core/pom.xml             | 4 ++--
 examples/pom.xml         | 4 ++++
 integration-test/pom.xml | 4 ++++
 pom.xml                  | 8 +++++---
 repl/pom.xml             | 4 ++--
 rsc/pom.xml              | 9 +++++++--
 6 files changed, 24 insertions(+), 9 deletions(-)

diff --git a/core/pom.xml b/core/pom.xml
index 5db4cc8f..25bbba52 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -38,8 +38,8 @@
     </dependency>
 
     <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-1.2-api</artifactId>
     </dependency>
 
     <dependency>
diff --git a/examples/pom.xml b/examples/pom.xml
index 400969a8..e09962e8 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -57,18 +57,22 @@
     <dependency>
       <groupId>org.apache.spark</groupId>
       <artifactId>spark-core_${scala.binary.version}</artifactId>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.spark</groupId>
       <artifactId>spark-sql_${scala.binary.version}</artifactId>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.spark</groupId>
       <artifactId>spark-hive_${scala.binary.version}</artifactId>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.spark</groupId>
       <artifactId>spark-streaming_${scala.binary.version}</artifactId>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
diff --git a/integration-test/pom.xml b/integration-test/pom.xml
index 81463850..43410c2a 100644
--- a/integration-test/pom.xml
+++ b/integration-test/pom.xml
@@ -108,6 +108,10 @@
           <groupId>org.apache.zookeeper</groupId>
           <artifactId>zookeeper</artifactId>
         </exclusion>
+            <exclusion>
+              <groupId>org.apache.logging.log4j</groupId>
+              <artifactId>log4j-1.2-api</artifactId>
+            </exclusion>
       </exclusions>
     </dependency>
 
diff --git a/pom.xml b/pom.xml
index bb8841f4..6f22a77a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -97,6 +97,7 @@
     <json4s.version>${json4s.spark-2.11.version}</json4s.version>
     <junit.version>4.11</junit.version>
     <libthrift.version>0.9.3</libthrift.version>
+    <log4j.version>2.19.0</log4j.version>
     <kryo.version>4.0.2</kryo.version>
     <metrics.version>3.1.0</metrics.version>
     <mockito.version>1.10.19</mockito.version>
@@ -264,9 +265,10 @@
     <dependencies>
 
       <dependency>
-        <groupId>log4j</groupId>
-        <artifactId>log4j</artifactId>
-        <version>1.2.16</version>
+        <!-- API bridge between log4j 1 and 2 -->
+        <groupId>org.apache.logging.log4j</groupId>
+        <artifactId>log4j-1.2-api</artifactId>
+        <version>${log4j.version}</version>
       </dependency>
 
       <dependency>
diff --git a/repl/pom.xml b/repl/pom.xml
index dec6b092..f552f73b 100644
--- a/repl/pom.xml
+++ b/repl/pom.xml
@@ -84,8 +84,8 @@
     </dependency>
 
     <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-1.2-api</artifactId>
       <scope>provided</scope>
     </dependency>
 
diff --git a/rsc/pom.xml b/rsc/pom.xml
index 01a82805..ccab939f 100644
--- a/rsc/pom.xml
+++ b/rsc/pom.xml
@@ -87,10 +87,15 @@
       <scope>provided</scope>
     </dependency>
     <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-1.2-api</artifactId>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+      <version>${log4j.version}</version>
+    </dependency>
     <dependency>
       <groupId>org.apache.spark</groupId>
       <artifactId>spark-core_${scala.binary.version}</artifactId>

Reply via email to