Skip to content

Commit

Permalink
dependency minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfboys committed Aug 4, 2023
1 parent 5be85ca commit 3fe99b7
Show file tree
Hide file tree
Showing 14 changed files with 114 additions and 75 deletions.
32 changes: 32 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
9 changes: 5 additions & 4 deletions streampark-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -184,6 +184,7 @@
<artifactSet>
<includes>
<include>com.beachape:*</include>
<include>com.lihaoyi:*</include>
<include>io.netty:netty-resolver</include>
</includes>
</artifactSet>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand All @@ -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,
Expand All @@ -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)
}
}

Expand Down
113 changes: 54 additions & 59 deletions streampark-console/streampark-console-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand Down Expand Up @@ -282,6 +273,7 @@
<version>${postgresql.version}</version>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
Expand Down Expand Up @@ -344,7 +336,6 @@
<dependency>
<groupId>org.apache.streampark</groupId>
<artifactId>streampark-common_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
<dependency>
<groupId>org.apache.streampark</groupId>
<artifactId>streampark-common_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<dependency>
<groupId>org.apache.streampark</groupId>
<artifactId>streampark-common_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
Expand Down
1 change: 0 additions & 1 deletion streampark-flink/streampark-flink-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
<dependency>
<groupId>org.apache.streampark</groupId>
<artifactId>streampark-common_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -58,6 +75,7 @@
<artifactId>kubernetes-client</artifactId>
<version>${fabric8.version}</version>
</dependency>

<dependency>
<groupId>io.fabric8</groupId>
<artifactId>generator-annotations</artifactId>
Expand Down
1 change: 0 additions & 1 deletion streampark-flink/streampark-flink-kubernetes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
1 change: 0 additions & 1 deletion streampark-flink/streampark-flink-packer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<dependency>
<groupId>org.apache.streampark</groupId>
<artifactId>streampark-common_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
Expand Down
Loading

0 comments on commit 3fe99b7

Please sign in to comment.