This is an automated email from the ASF dual-hosted git repository. benjobs pushed a commit to branch dependency in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
commit 3fe99b73966284e0201218ad5650dae266d22fa4 Author: benjobs <[email protected]> AuthorDate: Fri Aug 4 15:03:39 2023 +0800 dependency minor improvement --- pom.xml | 32 ++++++ streampark-common/pom.xml | 9 +- .../org/apache/streampark/common/zio/ZIOExt.scala | 2 +- .../zio/{LoggerBackend.scala => ZIOLogger.scala} | 5 +- .../streampark-console-service/pom.xml | 113 ++++++++++----------- .../streampark-flink-client-api/pom.xml | 1 - .../streampark-flink-connector-base/pom.xml | 1 - streampark-flink/streampark-flink-core/pom.xml | 1 - .../streampark-flink-kubernetes-engine/pom.xml | 20 +++- .../streampark-flink-kubernetes/pom.xml | 1 - streampark-flink/streampark-flink-packer/pom.xml | 1 - streampark-flink/streampark-flink-proxy/pom.xml | 1 - .../streampark-flink-shims-base/pom.xml | 1 - streampark-flink/streampark-flink-udf/pom.xml | 1 - 14 files changed, 114 insertions(+), 75 deletions(-) diff --git a/pom.xml b/pom.xml index 953d4569a..2706cabc1 100644 --- a/pom.xml +++ b/pom.xml @@ -217,6 +217,12 @@ </exclusions> </dependency> + <dependency> + <groupId>org.apache.streampark</groupId> + <artifactId>streampark-common_${scala.binary.version}</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> <groupId>com.github.ben-manes.caffeine</groupId> <artifactId>caffeine</artifactId> @@ -436,6 +442,32 @@ <scope>test</scope> </dependency> + <!-- ZIO --> + <dependency> + <groupId>dev.zio</groupId> + <artifactId>zio-logging_${scala.binary.version}</artifactId> + <version>${zio-logging.version}</version> + </dependency> + + <dependency> + <groupId>dev.zio</groupId> + <artifactId>zio-streams_${scala.binary.version}</artifactId> + <version>${zio.version}</version> + </dependency> + + <dependency> + <groupId>dev.zio</groupId> + <artifactId>zio-concurrent_${scala.binary.version}</artifactId> + <version>${zio.version}</version> + </dependency> + + <!-- pprint --> + <dependency> + <groupId>com.lihaoyi</groupId> + <artifactId>pprint_${scala.binary.version}</artifactId> + <version>${pprint.version}</version> + </dependency> + </dependencies> </dependencyManagement> diff --git a/streampark-common/pom.xml b/streampark-common/pom.xml index b936b82ca..64694d942 100644 --- a/streampark-common/pom.xml +++ b/streampark-common/pom.xml @@ -132,26 +132,26 @@ <dependency> <groupId>dev.zio</groupId> <artifactId>zio-logging_${scala.binary.version}</artifactId> - <version>${zio-logging.version}</version> + <optional>true</optional> </dependency> <dependency> <groupId>dev.zio</groupId> <artifactId>zio-streams_${scala.binary.version}</artifactId> - <version>${zio.version}</version> + <optional>true</optional> </dependency> <dependency> <groupId>dev.zio</groupId> <artifactId>zio-concurrent_${scala.binary.version}</artifactId> - <version>${zio.version}</version> + <optional>true</optional> </dependency> <!-- pprint --> <dependency> <groupId>com.lihaoyi</groupId> <artifactId>pprint_${scala.binary.version}</artifactId> - <version>${pprint.version}</version> + <optional>true</optional> </dependency> </dependencies> @@ -184,6 +184,7 @@ <artifactSet> <includes> <include>com.beachape:*</include> + <include>com.lihaoyi:*</include> <include>io.netty:netty-resolver</include> </includes> </artifactSet> diff --git a/streampark-common/src/main/scala/org/apache/streampark/common/zio/ZIOExt.scala b/streampark-common/src/main/scala/org/apache/streampark/common/zio/ZIOExt.scala index 0a6ad0646..6fb546c65 100644 --- a/streampark-common/src/main/scala/org/apache/streampark/common/zio/ZIOExt.scala +++ b/streampark-common/src/main/scala/org/apache/streampark/common/zio/ZIOExt.scala @@ -28,7 +28,7 @@ object ZIOExt { @inline def unsafeRun[E, A](zio: IO[E, A]): A = Unsafe.unsafe { implicit u => Runtime.default.unsafe - .run(zio.provideLayer(Runtime.removeDefaultLoggers >>> LoggerBackend.default)) + .run(zio.provideLayer(Runtime.removeDefaultLoggers >>> ZIOLogger.default)) .getOrThrowFiberFailure() } diff --git a/streampark-common/src/main/scala/org/apache/streampark/common/zio/LoggerBackend.scala b/streampark-common/src/main/scala/org/apache/streampark/common/zio/ZIOLogger.scala similarity index 96% rename from streampark-common/src/main/scala/org/apache/streampark/common/zio/LoggerBackend.scala rename to streampark-common/src/main/scala/org/apache/streampark/common/zio/ZIOLogger.scala index 4ad4979cf..29a6232f6 100644 --- a/streampark-common/src/main/scala/org/apache/streampark/common/zio/LoggerBackend.scala +++ b/streampark-common/src/main/scala/org/apache/streampark/common/zio/ZIOLogger.scala @@ -25,7 +25,7 @@ import zio.logging.LoggerNameExtractor import scala.collection.concurrent.TrieMap /** ZIO logging Backend that bridging to [[org.apache.streampark.common.util.Logger]] */ -object LoggerBackend { +object ZIOLogger { lazy val default: ZLayer[Any, Nothing, Unit] = Runtime.addLogger(provideLogger()) @@ -46,7 +46,7 @@ object LoggerBackend { def debug(msg: String): Unit = super.logDebug(msg) } - private def provideLogger(): ZLogger[String, Unit] = ( + private[this] def provideLogger(): ZLogger[String, Unit] = ( trace: Trace, fiberId: FiberId, logLevel: LogLevel, @@ -73,6 +73,7 @@ object LoggerBackend { case LogLevel.Warning => logger.warn(msg) case LogLevel.Error => logger.error(msg) case LogLevel.Fatal => logger.error(msg) + case _ => logger.error(msg) } } diff --git a/streampark-console/streampark-console-service/pom.xml b/streampark-console/streampark-console-service/pom.xml index 3b1b242a3..9d1099271 100644 --- a/streampark-console/streampark-console-service/pom.xml +++ b/streampark-console/streampark-console-service/pom.xml @@ -127,17 +127,6 @@ </dependency> <!--spring--> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter</artifactId> - <exclusions> - <exclusion> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> @@ -160,24 +149,45 @@ <dependency> <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-actuator</artifactId> + <artifactId>spring-boot-starter-websocket</artifactId> + </dependency> + + <dependency> + <groupId>org.springframework.ldap</groupId> + <artifactId>spring-ldap-core</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-websocket</artifactId> + <artifactId>spring-boot-starter-aop</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-validation</artifactId> + <artifactId>spring-boot-starter-quartz</artifactId> + <exclusions> + <exclusion> + <groupId>com.mchange</groupId> + <artifactId>mchange-commons-java</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> - <groupId>org.springframework.ldap</groupId> - <artifactId>spring-ldap-core</artifactId> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter</artifactId> + </exclusion> + </exclusions> </dependency> + <!-- springboot end --> + + <!-- shiro-spring --> <dependency> <groupId>org.apache.shiro</groupId> @@ -192,62 +202,43 @@ </dependency> <!-- pac4j for SSO--> - <dependency> - <groupId>io.buji</groupId> - <artifactId>buji-pac4j</artifactId> - <version>${bujiVersion}</version> - </dependency> <dependency> <groupId>org.pac4j</groupId> <artifactId>pac4j-core</artifactId> <version>${pac4jVersion}</version> </dependency> - <dependency> - <groupId>org.pac4j</groupId> - <artifactId>pac4j-springboot</artifactId> - <version>${pac4jVersion}</version> - <exclusions> - <exclusion> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> - </exclusion> - </exclusions> - </dependency> + <dependency> <groupId>org.pac4j</groupId> <artifactId>pac4j-oauth</artifactId> <version>${pac4jVersion}</version> </dependency> + <dependency> <groupId>org.pac4j</groupId> <artifactId>pac4j-oidc</artifactId> <version>${pac4jVersion}</version> </dependency> - <!-- spring cache --> <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-cache</artifactId> - </dependency> - - <!-- aop --> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-aop</artifactId> + <groupId>io.buji</groupId> + <artifactId>buji-pac4j</artifactId> + <version>${bujiVersion}</version> </dependency> - <!-- quartz --> <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-quartz</artifactId> + <groupId>org.pac4j</groupId> + <artifactId>pac4j-springboot</artifactId> + <version>${pac4jVersion}</version> <exclusions> <exclusion> - <groupId>com.mchange</groupId> - <artifactId>mchange-commons-java</artifactId> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> </exclusion> </exclusions> </dependency> + <!-- mybatis-plus --> <dependency> <groupId>com.baomidou</groupId> @@ -282,6 +273,7 @@ <version>${postgresql.version}</version> <optional>true</optional> </dependency> + <dependency> <groupId>org.freemarker</groupId> <artifactId>freemarker</artifactId> @@ -344,7 +336,6 @@ <dependency> <groupId>org.apache.streampark</groupId> <artifactId>streampark-common_${scala.binary.version}</artifactId> - <version>${project.version}</version> </dependency> <dependency> @@ -414,18 +405,6 @@ </dependency> <!--Test dependencies start.--> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> @@ -456,6 +435,22 @@ <artifactId>force-shading</artifactId> <scope>provided</scope> </dependency> + + <dependency> + <groupId>dev.zio</groupId> + <artifactId>zio-logging_${scala.binary.version}</artifactId> + </dependency> + + <dependency> + <groupId>dev.zio</groupId> + <artifactId>zio-streams_${scala.binary.version}</artifactId> + </dependency> + + <dependency> + <groupId>dev.zio</groupId> + <artifactId>zio-concurrent_${scala.binary.version}</artifactId> + </dependency> + </dependencies> <build> diff --git a/streampark-flink/streampark-flink-client/streampark-flink-client-api/pom.xml b/streampark-flink/streampark-flink-client/streampark-flink-client-api/pom.xml index 175d39bcf..b7a9e1858 100644 --- a/streampark-flink/streampark-flink-client/streampark-flink-client-api/pom.xml +++ b/streampark-flink/streampark-flink-client/streampark-flink-client-api/pom.xml @@ -31,7 +31,6 @@ <dependency> <groupId>org.apache.streampark</groupId> <artifactId>streampark-common_${scala.binary.version}</artifactId> - <version>${project.version}</version> </dependency> <dependency> diff --git a/streampark-flink/streampark-flink-connector/streampark-flink-connector-base/pom.xml b/streampark-flink/streampark-flink-connector/streampark-flink-connector-base/pom.xml index 9cc53cdaa..de2f50aa7 100644 --- a/streampark-flink/streampark-flink-connector/streampark-flink-connector-base/pom.xml +++ b/streampark-flink/streampark-flink-connector/streampark-flink-connector-base/pom.xml @@ -39,7 +39,6 @@ <dependency> <groupId>org.apache.streampark</groupId> <artifactId>streampark-common_${scala.binary.version}</artifactId> - <version>${project.version}</version> </dependency> <dependency> diff --git a/streampark-flink/streampark-flink-core/pom.xml b/streampark-flink/streampark-flink-core/pom.xml index 969ffac2f..f06782d6a 100644 --- a/streampark-flink/streampark-flink-core/pom.xml +++ b/streampark-flink/streampark-flink-core/pom.xml @@ -31,7 +31,6 @@ <dependency> <groupId>org.apache.streampark</groupId> <artifactId>streampark-common_${scala.binary.version}</artifactId> - <version>${project.version}</version> </dependency> <dependency> diff --git a/streampark-flink/streampark-flink-kubernetes-v2/streampark-flink-kubernetes-engine/pom.xml b/streampark-flink/streampark-flink-kubernetes-v2/streampark-flink-kubernetes-engine/pom.xml index e582bdaad..3c830f687 100644 --- a/streampark-flink/streampark-flink-kubernetes-v2/streampark-flink-kubernetes-engine/pom.xml +++ b/streampark-flink/streampark-flink-kubernetes-v2/streampark-flink-kubernetes-engine/pom.xml @@ -42,7 +42,24 @@ <dependency> <groupId>org.apache.streampark</groupId> <artifactId>streampark-common_${scala.binary.version}</artifactId> - <version>${project.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>dev.zio</groupId> + <artifactId>zio-logging_${scala.binary.version}</artifactId> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>dev.zio</groupId> + <artifactId>zio-streams_${scala.binary.version}</artifactId> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>dev.zio</groupId> + <artifactId>zio-concurrent_${scala.binary.version}</artifactId> <scope>provided</scope> </dependency> @@ -58,6 +75,7 @@ <artifactId>kubernetes-client</artifactId> <version>${fabric8.version}</version> </dependency> + <dependency> <groupId>io.fabric8</groupId> <artifactId>generator-annotations</artifactId> diff --git a/streampark-flink/streampark-flink-kubernetes/pom.xml b/streampark-flink/streampark-flink-kubernetes/pom.xml index 0ee290313..b69aae145 100644 --- a/streampark-flink/streampark-flink-kubernetes/pom.xml +++ b/streampark-flink/streampark-flink-kubernetes/pom.xml @@ -90,7 +90,6 @@ <dependency> <groupId>org.apache.streampark</groupId> <artifactId>streampark-common_${scala.binary.version}</artifactId> - <version>${project.version}</version> <scope>provided</scope> </dependency> diff --git a/streampark-flink/streampark-flink-packer/pom.xml b/streampark-flink/streampark-flink-packer/pom.xml index 61b78f30c..f1f6ceacd 100644 --- a/streampark-flink/streampark-flink-packer/pom.xml +++ b/streampark-flink/streampark-flink-packer/pom.xml @@ -39,7 +39,6 @@ <dependency> <groupId>org.apache.streampark</groupId> <artifactId>streampark-common_${scala.binary.version}</artifactId> - <version>${project.version}</version> </dependency> <dependency> diff --git a/streampark-flink/streampark-flink-proxy/pom.xml b/streampark-flink/streampark-flink-proxy/pom.xml index fae3d94e7..0021038e6 100644 --- a/streampark-flink/streampark-flink-proxy/pom.xml +++ b/streampark-flink/streampark-flink-proxy/pom.xml @@ -31,7 +31,6 @@ <dependency> <groupId>org.apache.streampark</groupId> <artifactId>streampark-common_${scala.binary.version}</artifactId> - <version>${project.version}</version> <scope>provided</scope> </dependency> diff --git a/streampark-flink/streampark-flink-shims/streampark-flink-shims-base/pom.xml b/streampark-flink/streampark-flink-shims/streampark-flink-shims-base/pom.xml index 0358d858b..a5cb8a88f 100644 --- a/streampark-flink/streampark-flink-shims/streampark-flink-shims-base/pom.xml +++ b/streampark-flink/streampark-flink-shims/streampark-flink-shims-base/pom.xml @@ -33,7 +33,6 @@ <dependency> <groupId>org.apache.streampark</groupId> <artifactId>streampark-common_${scala.binary.version}</artifactId> - <version>${project.version}</version> </dependency> <!--flink base--> diff --git a/streampark-flink/streampark-flink-udf/pom.xml b/streampark-flink/streampark-flink-udf/pom.xml index 5cad3de17..af6b58c09 100644 --- a/streampark-flink/streampark-flink-udf/pom.xml +++ b/streampark-flink/streampark-flink-udf/pom.xml @@ -30,7 +30,6 @@ <dependency> <groupId>org.apache.streampark</groupId> <artifactId>streampark-common_${scala.binary.version}</artifactId> - <version>${project.version}</version> <exclusions> <exclusion> <groupId>commons-cli</groupId>
