You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by he...@apache.org on 2022/03/02 06:51:59 UTC

[incubator-inlong] branch master updated: [INLONG-2790][Agent] The log4j cannot be output due to jar conflict (#2822)

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

healchow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new dc867d7  [INLONG-2790][Agent] The log4j cannot be output due to jar conflict (#2822)
dc867d7 is described below

commit dc867d7d02d4222301658eb8211934e8d55f243c
Author: ziruipeng <zp...@connect.ust.hk>
AuthorDate: Wed Mar 2 14:51:55 2022 +0800

    [INLONG-2790][Agent] The log4j cannot be output due to jar conflict (#2822)
---
 inlong-agent/agent-docker/pom.xml  | 10 ++++++++++
 inlong-agent/agent-plugins/pom.xml |  6 ++++++
 inlong-agent/pom.xml               |  2 +-
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/inlong-agent/agent-docker/pom.xml b/inlong-agent/agent-docker/pom.xml
index 38cef5b..c9b9f45 100644
--- a/inlong-agent/agent-docker/pom.xml
+++ b/inlong-agent/agent-docker/pom.xml
@@ -35,6 +35,16 @@
       <artifactId>agent-release</artifactId>
       <version>${project.parent.version}</version>
       <classifier>bin</classifier>
+      <exclusions>
+        <exclusion>
+          <artifactId>log4j-api</artifactId>
+          <groupId>org.apache.logging.log4j</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>log4j-slf4j-impl</artifactId>
+          <groupId>org.apache.logging.log4j</groupId>
+        </exclusion>
+      </exclusions>
       <type>tar.gz</type>
       <scope>provided</scope>
     </dependency>
diff --git a/inlong-agent/agent-plugins/pom.xml b/inlong-agent/agent-plugins/pom.xml
index 252dcb1..da6c1ec 100644
--- a/inlong-agent/agent-plugins/pom.xml
+++ b/inlong-agent/agent-plugins/pom.xml
@@ -96,6 +96,12 @@
             <groupId>org.apache.inlong</groupId>
             <artifactId>dataproxy-sdk</artifactId>
             <version>${project.version}</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>log4j-slf4j-impl</artifactId>
+                    <groupId>org.apache.logging.log4j</groupId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <artifactId>slf4j-log4j12</artifactId>
diff --git a/inlong-agent/pom.xml b/inlong-agent/pom.xml
index fd568aa..993f532 100644
--- a/inlong-agent/pom.xml
+++ b/inlong-agent/pom.xml
@@ -50,7 +50,7 @@
         <gson.version>2.8.5</gson.version>
         <guava.version>12.0.1</guava.version>
         <jdk.version>1.8</jdk.version>
-        <log4j2.version>2.17.1</log4j2.version>
+        <log4j2.version>1.2.17</log4j2.version>
         <mockito.version>3.3.3</mockito.version>
         <plugin.assembly.version>3.2.0</plugin.assembly.version>
         <slf4j.version>1.7.30</slf4j.version>