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

muchunjin pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git


The following commit(s) were added to refs/heads/dev by this push:
     new 7af7e84f2 [Improve] log4j shaded module improvement (#2617)
7af7e84f2 is described below

commit 7af7e84f2cca30f10568d0cd6df55c7943cdab5d
Author: benjobs <[email protected]>
AuthorDate: Fri Apr 14 09:14:35 2023 +0800

    [Improve] log4j shaded module improvement (#2617)
    
    * [Improve] log4j shaded module improvement
    
    * KubernetesNativeClientTrait bug fixed
    
    * [Improve] rename log4j shaded module
---
 .github/workflows/maven.yml                        |   2 +-
 build.sh                                           |   4 +-
 pom.xml                                            |  51 +---
 streampark-common/pom.xml                          |   6 +-
 .../org/apache/streampark/common/util/Logger.scala |  59 +++--
 .../streampark-console-service/pom.xml             |  21 --
 .../impl/KubernetesNativeApplicationClient.scala   |  12 -
 .../client/trait/KubernetesNativeClientTrait.scala |  18 +-
 streampark-shade/pom.xml                           | 294 ---------------------
 streampark-shaded/pom.xml                          | 112 +++++++-
 .../streampark-shaded-jackson/pom.xml              |  21 +-
 .../pom.xml                                        |  39 +--
 .../streampark-spark-cli/create_app.sh             |   1 -
 13 files changed, 180 insertions(+), 460 deletions(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 6f5741933..4a56e05f4 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -91,7 +91,7 @@ jobs:
           distribution: "adopt"
           cache: "maven"
       - name: Build with Maven
-        run: ./mvnw -B clean package -P${{ matrix.scala }} -DskipTests
+        run: ./mvnw -B clean install -P${{ matrix.scala }},shaded -DskipTests
       - name: Test with Maven
         run: ./mvnw -B test -P${{ matrix.scala }}
 
diff --git a/build.sh b/build.sh
index 6ade6b847..f1937bb81 100755
--- a/build.sh
+++ b/build.sh
@@ -179,7 +179,7 @@ mixedPackage() {
 
   echo_g "build info: package mode @ mixed, $scala, now build starting..."
 
-  "$PRG_DIR/mvnw" -P$scala,webapp,dist -DskipTests clean package
+  "$PRG_DIR/mvnw" -P$scala,shaded,webapp,dist -DskipTests clean install
 
   if [ $? -eq 0 ]; then
      printf '\n'
@@ -197,7 +197,7 @@ detachedPackage () {
 
   echo_g "build info: package mode @ detached, $scala, now build starting..."
 
-  "$PRG_DIR"/mvnw -P$scala,dist -DskipTests clean package
+  "$PRG_DIR"/mvnw -P$scala,shaded,dist -DskipTests clean install
 
   if [ $? -eq 0 ]; then
     printf '\n'
diff --git a/pom.xml b/pom.xml
index f4414e15a..57f1e307d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,7 +77,6 @@
 
     <modules>
         <module>streampark-common</module>
-        <module>streampark-shaded</module>
         <module>streampark-flink</module>
         <module>streampark-storage</module>
         <module>streampark-console</module>
@@ -96,6 +95,7 @@
 
         <flink.version>1.14.0</flink.version>
         <flink.shaded.version>1.8.1</flink.shaded.version>
+        <streampark.shaded.version>1.0.0</streampark.shaded.version>
         <streampark.flink.shims.version>1.14</streampark.flink.shims.version>
         <spark.version>3.2.0</spark.version>
         <scalikejdbc.version>4.0.0</scalikejdbc.version>
@@ -107,7 +107,6 @@
         <influxdb.version>2.17</influxdb.version>
         <protobuf.version>2.5.0</protobuf.version>
         <slf4j.version>1.7.32</slf4j.version>
-        <log4j.version>2.17.1</log4j.version>
         <logback.version>1.2.11</logback.version>
         <grpc.version>1.15.0</grpc.version>
         <jackson.version>2.13.4</jackson.version>
@@ -533,25 +532,6 @@
                 <version>${slf4j.version}</version>
             </dependency>
 
-            <dependency>
-                <groupId>org.slf4j</groupId>
-                <artifactId>log4j-over-slf4j</artifactId>
-                <version>${slf4j.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>org.apache.logging.log4j</groupId>
-                <artifactId>log4j-core</artifactId>
-                <version>${log4j.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>org.apache.logging.log4j</groupId>
-                <artifactId>log4j-api</artifactId>
-                <version>${log4j.version}</version>
-            </dependency>
-            <!--log4j end-->
-
             <!-- logback -->
             <dependency>
                 <groupId>ch.qos.logback</groupId>
@@ -569,22 +549,6 @@
                 </exclusions>
             </dependency>
 
-            <dependency>
-                <groupId>ch.qos.logback</groupId>
-                <artifactId>logback-core</artifactId>
-                <version>${logback.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>log4j</groupId>
-                        <artifactId>*</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>org.slf4j</groupId>
-                        <artifactId>*</artifactId>
-                    </exclusion>
-                </exclusions>
-            </dependency>
-
             <dependency>
                 <groupId>org.projectlombok</groupId>
                 <artifactId>lombok</artifactId>
@@ -650,12 +614,6 @@
             <scope>provided</scope>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-core</artifactId>
-            <optional>true</optional>
-        </dependency>
-
     </dependencies>
 
     <build>
@@ -1020,6 +978,13 @@
             </properties>
         </profile>
 
+        <profile>
+            <id>shaded</id>
+            <modules>
+                <module>streampark-shaded</module>
+            </modules>
+        </profile>
+
         <profile>
             <id>apache-release</id>
             <build>
diff --git a/streampark-common/pom.xml b/streampark-common/pom.xml
index 0f6a72f64..4b6df9976 100644
--- a/streampark-common/pom.xml
+++ b/streampark-common/pom.xml
@@ -174,11 +174,11 @@
             <optional>true</optional>
         </dependency>
 
-        <!--log4j -->
+        <!--logback -->
         <dependency>
             <groupId>org.apache.streampark</groupId>
-            <artifactId>streampark-shaded-slf4j</artifactId>
-            <version>${project.version}</version>
+            <artifactId>streampark-shaded-logback</artifactId>
+            <version>${streampark.shaded.version}</version>
         </dependency>
 
     </dependencies>
diff --git 
a/streampark-common/src/main/scala/org/apache/streampark/common/util/Logger.scala
 
b/streampark-common/src/main/scala/org/apache/streampark/common/util/Logger.scala
index da04653b8..a2078c37b 100644
--- 
a/streampark-common/src/main/scala/org/apache/streampark/common/util/Logger.scala
+++ 
b/streampark-common/src/main/scala/org/apache/streampark/common/util/Logger.scala
@@ -45,58 +45,62 @@ trait Logger {
   protected def logger: Slf4JLogger = {
     if (_logger == null) {
       initializeLogging()
-      val factory = LoggerFactory.getLoggerFactory()
-      _logger = factory.getLogger(logName)
     }
     _logger
   }
 
-  def logInfo(msg: => String) {
-    logger.info(s"$prefix $msg")
+
+  protected def logInfo(msg: => String) {
+    if (logger.isInfoEnabled) logger.info(s"$prefix $msg")
   }
 
-  def logInfo(msg: => String, throwable: Throwable) {
-    logger.info(s"$prefix $msg", throwable)
+  protected def logInfo(msg: => String, throwable: Throwable) {
+    if (logger.isInfoEnabled) logger.info(s"$prefix $msg", throwable)
   }
 
-  def logDebug(msg: => String) {
-    logger.debug(s"$prefix $msg")
+  protected def logDebug(msg: => String) {
+    if (logger.isDebugEnabled) logger.debug(s"$prefix $msg")
   }
 
-  def logDebug(msg: => String, throwable: Throwable) {
-    logger.debug(s"$prefix $msg", throwable)
+  protected def logDebug(msg: => String, throwable: Throwable) {
+    if (logger.isDebugEnabled) logger.debug(s"$prefix $msg", throwable)
   }
 
   def logTrace(msg: => String) {
-    logger.trace(s"$prefix $msg")
+    if (logger.isTraceEnabled) logger.trace(s"$prefix $msg")
   }
 
-  def logTrace(msg: => String, throwable: Throwable) {
-    logger.trace(s"$prefix $msg", throwable)
+  protected def logTrace(msg: => String, throwable: Throwable) {
+    if (logger.isTraceEnabled) logger.trace(s"$prefix $msg", throwable)
   }
 
   def logWarn(msg: => String) {
-    logger.warn(s"$prefix $msg")
+    if (logger.isWarnEnabled) logger.warn(s"$prefix $msg")
+  }
+
+  protected def logWarn(msg: => String, throwable: Throwable) {
+    if (logger.isWarnEnabled) logger.warn(s"$prefix $msg", throwable)
   }
 
-  def logWarn(msg: => String, throwable: Throwable) {
-    logger.warn(s"$prefix $msg", throwable)
+  protected def logError(msg: => String) {
+    if (logger.isErrorEnabled) logger.error(s"$prefix $msg")
   }
 
-  def logError(msg: => String) {
-    logger.error(s"$prefix $msg")
+  protected def logError(msg: => String, throwable: Throwable) {
+    if (logger.isErrorEnabled) logger.error(s"$prefix $msg", throwable)
   }
 
-  def logError(msg: => String, throwable: Throwable) {
-    logger.error(s"$prefix $msg", throwable)
+  protected def isTraceEnabled(): Boolean = {
+    logger.isTraceEnabled
   }
 
   protected def initializeLogging(): Unit = {
     if (!Logger.initialized) {
       Logger.initLock.synchronized {
         if (!Logger.initialized) {
+          val factory = LoggerFactory.getLoggerFactory()
+          _logger = factory.getLogger(logName)
           Logger.initialized = true
-          logger
         }
       }
     }
@@ -141,6 +145,9 @@ private[this] object LoggerFactory extends 
LoggerFactoryBinder {
   override def getLoggerFactoryClassStr: String = 
contextSelectorBinder.getClass.getName
 
   private class ContextInitializer(loggerContext: LoggerContext) extends 
LogBackContextInitializer(loggerContext) {
+
+    val shadedPackage = "org.apache.streampark.shaded"
+
     override def configureByResource(url: URL): Unit = {
       Utils.notNull(url, "URL argument cannot be null")
       val path = url.getPath
@@ -150,16 +157,10 @@ private[this] object LoggerFactory extends 
LoggerFactoryBinder {
         val text = FileUtils.readString(new File(path))
           .replaceAll(
             "ch.qos.logback",
-            "org.apache.streampark.shaded.ch.qos.logback")
+            s"$shadedPackage.ch.qos.logback")
           .replaceAll(
             "org.slf4j",
-            "org.apache.streampark.shaded.org.slf4j")
-          .replaceAll(
-            "org.apache.log4j",
-            "org.apache.streampark.shaded.org.apache.log4j")
-          .replaceAll(
-            "org.apache.logging.log4j",
-            "org.apache.streampark.shaded.org.apache.logging.log4j")
+            s"$shadedPackage.org.slf4j")
 
         val input = new 
ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8))
         configurator.doConfigure(input)
diff --git a/streampark-console/streampark-console-service/pom.xml 
b/streampark-console/streampark-console-service/pom.xml
index 71fdafb52..9953f4816 100644
--- a/streampark-console/streampark-console-service/pom.xml
+++ b/streampark-console/streampark-console-service/pom.xml
@@ -405,33 +405,12 @@
             <artifactId>slf4j-api</artifactId>
         </dependency>
 
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>log4j-over-slf4j</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-core</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-api</artifactId>
-        </dependency>
-        <!--log4j end-->
-
         <!-- logback -->
         <dependency>
             <groupId>ch.qos.logback</groupId>
             <artifactId>logback-classic</artifactId>
         </dependency>
 
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-core</artifactId>
-        </dependency>
-
     </dependencies>
 
     <build>
diff --git 
a/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesNativeApplicationClient.scala
 
b/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesNativeApplicationClient.scala
index 034c0ab1d..d291eb42e 100644
--- 
a/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesNativeApplicationClient.scala
+++ 
b/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/impl/KubernetesNativeApplicationClient.scala
@@ -36,18 +36,6 @@ import org.apache.streampark.flink.client.bean._
  */
 object KubernetesNativeApplicationClient extends KubernetesNativeClientTrait {
 
-  override def setConfig(submitRequest: SubmitRequest, flinkConfig: 
Configuration): Unit = {
-    if (submitRequest.buildResult != null) {
-      val buildResult = 
submitRequest.buildResult.asInstanceOf[DockerImageBuildResponse]
-        buildResult.podTemplatePaths.foreach(p => {
-          flinkConfig
-            .safeSet(KubernetesConfigOptions.KUBERNETES_POD_TEMPLATE, p._2)
-            .safeSet(KubernetesConfigOptions.JOB_MANAGER_POD_TEMPLATE, p._2)
-            .safeSet(KubernetesConfigOptions.TASK_MANAGER_POD_TEMPLATE, p._2)
-        })
-    }
-  }
-
   @throws[Exception]
   override def doSubmit(submitRequest: SubmitRequest, flinkConfig: 
Configuration): SubmitResponse = {
 
diff --git 
a/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/trait/KubernetesNativeClientTrait.scala
 
b/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/trait/KubernetesNativeClientTrait.scala
index c6a8710c2..65b627ded 100644
--- 
a/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/trait/KubernetesNativeClientTrait.scala
+++ 
b/streampark-flink/streampark-flink-client/streampark-flink-client-core/src/main/scala/org/apache/streampark/flink/client/trait/KubernetesNativeClientTrait.scala
@@ -18,9 +18,7 @@
 package org.apache.streampark.flink.client.`trait`
 
 import javax.annotation.Nonnull
-
 import scala.language.postfixOps
-
 import org.apache.commons.lang3.StringUtils
 import org.apache.flink.api.common.JobID
 import org.apache.flink.client.deployment.ClusterSpecification
@@ -29,10 +27,10 @@ import org.apache.flink.configuration._
 import org.apache.flink.kubernetes.{KubernetesClusterClientFactory, 
KubernetesClusterDescriptor}
 import org.apache.flink.kubernetes.configuration.KubernetesConfigOptions
 import 
org.apache.flink.kubernetes.configuration.KubernetesConfigOptions.ServiceExposedType
-
-import org.apache.streampark.common.enums.FlinkK8sRestExposedType
+import org.apache.streampark.common.enums.{ExecutionMode, 
FlinkK8sRestExposedType}
 import org.apache.streampark.flink.kubernetes.IngressController
 import org.apache.streampark.flink.client.bean._
+import org.apache.streampark.flink.packer.pipeline.DockerImageBuildResponse
 
 /**
  * kubernetes native mode submit
@@ -48,6 +46,18 @@ trait KubernetesNativeClientTrait extends FlinkClientTrait {
         KubernetesConfigOptions.REST_SERVICE_EXPOSED_TYPE,
         
covertToServiceExposedType(submitRequest.k8sSubmitParam.flinkRestExposedType))
 
+    if (submitRequest.buildResult != null) {
+      if (submitRequest.executionMode == 
ExecutionMode.KUBERNETES_NATIVE_APPLICATION) {
+        val buildResult = 
submitRequest.buildResult.asInstanceOf[DockerImageBuildResponse]
+        buildResult.podTemplatePaths.foreach(p => {
+          flinkConfig
+            .safeSet(KubernetesConfigOptions.KUBERNETES_POD_TEMPLATE, p._2)
+            .safeSet(KubernetesConfigOptions.JOB_MANAGER_POD_TEMPLATE, p._2)
+            .safeSet(KubernetesConfigOptions.TASK_MANAGER_POD_TEMPLATE, p._2)
+        })
+      }
+    }
+
     // add flink conf configuration, mainly to set the log4j configuration
     if (!flinkConfig.contains(DeploymentOptionsInternal.CONF_DIR)) {
       flinkConfig.safeSet(DeploymentOptionsInternal.CONF_DIR, 
s"${submitRequest.flinkVersion.flinkHome}/conf")
diff --git a/streampark-shade/pom.xml b/streampark-shade/pom.xml
deleted file mode 100644
index 8a64fd883..000000000
--- a/streampark-shade/pom.xml
+++ /dev/null
@@ -1,294 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.streampark</groupId>
-        <artifactId>streampark</artifactId>
-        <version>2.1.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>streampark-common_${scala.binary.version}</artifactId>
-    <name>StreamPark : Common</name>
-
-    <dependencies>
-
-        <!-- test -->
-        <dependency>
-            <groupId>org.junit.jupiter</groupId>
-            <artifactId>junit-jupiter-engine</artifactId>
-            <version>${jupiter.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.junit.jupiter</groupId>
-            <artifactId>junit-jupiter-params</artifactId>
-            <version>${jupiter.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <!-- enumeratum -->
-        <dependency>
-            <groupId>com.beachape</groupId>
-            <artifactId>enumeratum_${scala.binary.version}</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.github.ben-manes.caffeine</groupId>
-            <artifactId>caffeine</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>redis.clients</groupId>
-            <artifactId>jedis</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>com.zaxxer</groupId>
-            <artifactId>HikariCP</artifactId>
-            <exclusions>
-                <exclusion>
-                    <artifactId>slf4j-api</artifactId>
-                    <groupId>org.slf4j</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <dependency>
-            <groupId>org.yaml</groupId>
-            <artifactId>snakeyaml</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.typesafe</groupId>
-            <artifactId>config</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.json4s</groupId>
-            <artifactId>json4s-jackson_${scala.binary.version}</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>com.fasterxml.jackson.module</groupId>
-            
<artifactId>jackson-module-scala_${scala.binary.version}</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-cli</groupId>
-            <artifactId>commons-cli</artifactId>
-        </dependency>
-
-        <!--hbase-->
-        <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-client</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.hbase</groupId>
-            <artifactId>hbase-client</artifactId>
-            <exclusions>
-                <exclusion>
-                    <artifactId>junit</artifactId>
-                    <groupId>junit</groupId>
-                </exclusion>
-            </exclusions>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-yarn-api</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-yarn-client</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.mongodb</groupId>
-            <artifactId>mongo-java-driver</artifactId>
-            <version>3.12.2</version>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.curator</groupId>
-            <artifactId>curator-framework</artifactId>
-            <version>2.6.0</version>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.ivy</groupId>
-            <artifactId>ivy</artifactId>
-            <version>2.4.0</version>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>io.netty</groupId>
-            <artifactId>netty-resolver</artifactId>
-            <version>4.1.65.Final</version>
-            <optional>true</optional>
-        </dependency>
-
-        <!--log4j -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>log4j-over-slf4j</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-core</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-api</artifactId>
-            <optional>true</optional>
-        </dependency>
-        <!--log4j end-->
-
-        <!-- logback -->
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-classic</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-core</artifactId>
-            <optional>true</optional>
-        </dependency>
-        <!-- logback end -->
-
-    </dependencies>
-
-    <build>
-        <plugins>
-
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>net.alchim31.maven</groupId>
-                <artifactId>scala-maven-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            
<createDependencyReducedPom>true</createDependencyReducedPom>
-                            
<dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>
-                            <artifactSet>
-                                <includes>
-                                    <!--jackson-->
-                                    
<include>com.fasterxml.jackson.*:*</include>
-                                    <include>com.beachape:*</include>
-                                    <!-- logback -->
-                                    <include>org.slf4j:*:*</include>
-                                    
<include>org.apache.logging.log4j:*:*</include>
-                                    <include>ch.qos.logback:*:*</include>
-                                </includes>
-                            </artifactSet>
-                            <relocations>
-                                <relocation>
-                                    <pattern>com.fasterxml.jackson</pattern>
-                                    
<shadedPattern>${streampark.shaded.package}.com.fasterxml.jackson</shadedPattern>
-                                </relocation>
-                                <relocation>
-                                    <pattern>org.slf4j</pattern>
-                                    
<shadedPattern>${streampark.shaded.package}.org.slf4j</shadedPattern>
-                                </relocation>
-                                <relocation>
-                                    <pattern>ch.qos.logback</pattern>
-                                    
<shadedPattern>${streampark.shaded.package}.ch.qos.logback</shadedPattern>
-                                </relocation>
-                                <relocation>
-                                    <pattern>org.apache.logging.log4j</pattern>
-                                    
<shadedPattern>${streampark.shaded.package}.org.apache.logging.log4j</shadedPattern>
-                                </relocation>
-                                <relocation>
-                                    <pattern>org.apache.log4j</pattern>
-                                    
<shadedPattern>${streampark.shaded.package}.org.apache.log4j</shadedPattern>
-                                </relocation>
-                            </relocations>
-                            <filters>
-                                <filter>
-                                    <artifact>*:*</artifact>
-                                    <excludes>
-                                        <exclude>META-INF/*.SF</exclude>
-                                        <exclude>META-INF/*.DSA</exclude>
-                                        <exclude>META-INF/*.RSA</exclude>
-                                    </excludes>
-                                </filter>
-                            </filters>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-        </plugins>
-    </build>
-</project>
diff --git a/streampark-shaded/pom.xml b/streampark-shaded/pom.xml
index bca520acc..915312da8 100644
--- a/streampark-shaded/pom.xml
+++ b/streampark-shaded/pom.xml
@@ -18,19 +18,119 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
     <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.streampark</groupId>
-        <artifactId>streampark</artifactId>
-        <version>2.1.0-SNAPSHOT</version>
-    </parent>
 
+    <groupId>org.apache.streampark</groupId>
     <artifactId>streampark-shaded</artifactId>
+    <version>1.0.0</version>
     <name>StreamPark : Shaded Parent</name>
     <packaging>pom</packaging>
 
+    <properties>
+        <slf4j.version>1.7.32</slf4j.version>
+        <logback.version>1.2.11</logback.version>
+        <jackson.version>2.13.4</jackson.version>
+        <scala.version>2.12.8</scala.version>
+        <scala.binary.version>2.12</scala.binary.version>
+        <maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>
+        
<streampark.shaded.package>org.apache.streampark.shaded</streampark.shaded.package>
+    </properties>
+
+    <dependencyManagement>
+
+        <dependencies>
+            <!--log4j -->
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>${slf4j.version}</version>
+            </dependency>
+
+            <!-- logback -->
+            <dependency>
+                <groupId>ch.qos.logback</groupId>
+                <artifactId>logback-classic</artifactId>
+                <version>${logback.version}</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>log4j</groupId>
+                        <artifactId>*</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.slf4j</groupId>
+                        <artifactId>*</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+            <!--jackson-->
+            <dependency>
+                <groupId>com.fasterxml.jackson.core</groupId>
+                <artifactId>jackson-databind</artifactId>
+                <version>${jackson.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.fasterxml.jackson.core</groupId>
+                <artifactId>jackson-core</artifactId>
+                <version>${jackson.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.fasterxml.jackson.module</groupId>
+                
<artifactId>jackson-module-scala_${scala.binary.version}</artifactId>
+                <version>${jackson.version}</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>org.scala-lang</groupId>
+                        <artifactId>scala-reflect</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.scala-lang</groupId>
+                        <artifactId>scala-compiler</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.scala-lang</groupId>
+                        <artifactId>scala-library</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+        </dependencies>
+    </dependencyManagement>
+
     <modules>
-        <module>streampark-shaded-slf4j</module>
+        <module>streampark-shaded-logback</module>
         <module>streampark-shaded-jackson</module>
     </modules>
 
+    <profiles>
+        <profile>
+            <id>scala-2.11</id>
+            <properties>
+                <scala.version>2.11.12</scala.version>
+                <scala.binary.version>2.11</scala.binary.version>
+            </properties>
+        </profile>
+
+        <profile>
+            <id>scala-2.12</id>
+            <properties>
+                <scala.version>2.12.8</scala.version>
+                <scala.binary.version>2.12</scala.binary.version>
+            </properties>
+        </profile>
+    </profiles>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-shade-plugin</artifactId>
+                    <version>${maven-shade-plugin.version}</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+
 </project>
diff --git a/streampark-shaded/streampark-shaded-jackson/pom.xml 
b/streampark-shaded/streampark-shaded-jackson/pom.xml
index 18ff56cdd..5c5b085ab 100644
--- a/streampark-shaded/streampark-shaded-jackson/pom.xml
+++ b/streampark-shaded/streampark-shaded-jackson/pom.xml
@@ -21,10 +21,10 @@
     <parent>
         <groupId>org.apache.streampark</groupId>
         <artifactId>streampark-shaded</artifactId>
-        <version>2.1.0-SNAPSHOT</version>
+        <version>1.0.0</version>
     </parent>
 
-    <artifactId>streampark-shaded-jackson</artifactId>
+    <artifactId>streampark-shaded-jackson_${scala.binary.version}</artifactId>
     <name>StreamPark : Shaded Jackson </name>
 
     <dependencies>
@@ -34,6 +34,12 @@
             <optional>true</optional>
         </dependency>
 
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+            <optional>true</optional>
+        </dependency>
+
         <dependency>
             <groupId>com.fasterxml.jackson.module</groupId>
             
<artifactId>jackson-module-scala_${scala.binary.version}</artifactId>
@@ -43,11 +49,6 @@
 
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-            </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
@@ -74,6 +75,10 @@
                                     
<pattern>com.fasterxml.jackson.module</pattern>
                                     
<shadedPattern>${streampark.shaded.package}.com.fasterxml.jackson.module</shadedPattern>
                                 </relocation>
+                                <relocation>
+                                    
<pattern>com.fasterxml.jackson.module</pattern>
+                                    
<shadedPattern>${streampark.shaded.package}.com.fasterxml.jackson.module</shadedPattern>
+                                </relocation>
                                 <relocation>
                                     
<pattern>com.fasterxml.jackson.databind</pattern>
                                     
<shadedPattern>${streampark.shaded.package}.com.fasterxml.jackson.databind</shadedPattern>
@@ -93,7 +98,7 @@
                     </execution>
                 </executions>
             </plugin>
-
         </plugins>
     </build>
+
 </project>
diff --git a/streampark-shaded/streampark-shaded-slf4j/pom.xml 
b/streampark-shaded/streampark-shaded-logback/pom.xml
similarity index 80%
rename from streampark-shaded/streampark-shaded-slf4j/pom.xml
rename to streampark-shaded/streampark-shaded-logback/pom.xml
index bd5d0e4cf..5a47af8d6 100644
--- a/streampark-shaded/streampark-shaded-slf4j/pom.xml
+++ b/streampark-shaded/streampark-shaded-logback/pom.xml
@@ -21,40 +21,20 @@
     <parent>
         <groupId>org.apache.streampark</groupId>
         <artifactId>streampark-shaded</artifactId>
-        <version>2.1.0-SNAPSHOT</version>
+        <version>1.0.0</version>
     </parent>
 
-    <artifactId>streampark-shaded-slf4j</artifactId>
-    <name>StreamPark : Shaded Slf4j </name>
+    <artifactId>streampark-shaded-logback</artifactId>
+    <name>StreamPark : Shaded Logback </name>
 
     <dependencies>
 
-        <!--log4j -->
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
             <optional>true</optional>
         </dependency>
 
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>log4j-over-slf4j</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-core</artifactId>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-api</artifactId>
-            <optional>true</optional>
-        </dependency>
-        <!--log4j end-->
-
         <!-- logback -->
         <dependency>
             <groupId>ch.qos.logback</groupId>
@@ -62,22 +42,10 @@
             <optional>true</optional>
         </dependency>
 
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-core</artifactId>
-            <optional>true</optional>
-        </dependency>
-        <!-- logback end -->
-
     </dependencies>
 
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-            </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
@@ -129,7 +97,6 @@
                     </execution>
                 </executions>
             </plugin>
-
         </plugins>
     </build>
 </project>
diff --git a/streampark-spark/streampark-spark-cli/create_app.sh 
b/streampark-spark/streampark-spark-cli/create_app.sh
index 91c5d8426..cc4cf1cb9 100644
--- a/streampark-spark/streampark-spark-cli/create_app.sh
+++ b/streampark-spark/streampark-spark-cli/create_app.sh
@@ -275,7 +275,6 @@ cat > $name/pom.xml <<EOF
         <es.version>5.6.3</es.version>
         <protobuf.version>2.5.0</protobuf.version>
 
-        <log4j.version>1.7.25</log4j.version>
         <json4s.version>3.2.10</json4s.version>
         <spray.version>1.3.3</spray.version>
         <akka.version>2.3.9</akka.version>


Reply via email to