From 008984a73ec57c86125d87ba3b70370f4031cecb Mon Sep 17 00:00:00 2001 From: "chenglong.wang" Date: Thu, 26 Dec 2024 09:58:39 +0800 Subject: [PATCH] [improve] Adjust pom dependencies and packaging strategy #159 --- flink-connector-clickhouse-e2e-test/pom.xml | 31 +----- flink-connector-clickhouse/pom.xml | 61 +---------- flink-sql-connector-clickhouse/pom.xml | 59 +++------- pom.xml | 114 +++++++++++++------- 4 files changed, 95 insertions(+), 170 deletions(-) diff --git a/flink-connector-clickhouse-e2e-test/pom.xml b/flink-connector-clickhouse-e2e-test/pom.xml index d2285ed..678d8ce 100644 --- a/flink-connector-clickhouse-e2e-test/pom.xml +++ b/flink-connector-clickhouse-e2e-test/pom.xml @@ -24,7 +24,6 @@ limitations under the License. 1.0.0-SNAPSHOT - org.apache.flink Flink : Connectors : Clickhouse : E2E Tests flink-connector-clickhouse-e2e-test https://flink.apache.org @@ -35,20 +34,15 @@ limitations under the License. - - org.apache.flink - flink-connector-test-utils - ${flink.version} - org.testcontainers clickhouse ${testcontainer.version} - com.clickhouse - clickhouse-jdbc - ${clickhouse-jdbc.version} + org.apache.flink + flink-connector-test-utils + ${flink.version} test @@ -57,25 +51,6 @@ limitations under the License. ${project.version} test - - org.apache.httpcomponents.client5 - httpclient5 - ${httpclient5.version} - test - - - org.apache.httpcomponents.core5 - httpcore5 - ${httpcore5.version} - test - - - - org.apache.httpcomponents.core5 - httpcore5-h2 - ${httpcore5.version} - test - diff --git a/flink-connector-clickhouse/pom.xml b/flink-connector-clickhouse/pom.xml index 853d1b0..d7760fa 100644 --- a/flink-connector-clickhouse/pom.xml +++ b/flink-connector-clickhouse/pom.xml @@ -26,97 +26,52 @@ limitations under the License. flink-connector-clickhouse Flink : Connectors : Clickhouse - jar - - - - - org.apache.flink - flink-streaming-java - ${flink.version} - provided - - - - org.apache.flink flink-connector-base - ${flink.version} - - - - org.apache.flink flink-table-api-java-bridge - ${flink.version} - provided - true - com.clickhouse clickhouse-jdbc - ${clickhouse-jdbc.version} - - - com.fasterxml.jackson.core - jackson-databind - ${jackson.version} org.apache.commons commons-lang3 - ${commons-lang3.version} - - - org.apache.httpcomponents.client5 httpclient5 - 5.2.1 - org.apache.flink - flink-core - ${flink.version} - test - test-jar - - - - org.apache.flink - flink-streaming-java + flink-test-utils ${flink.version} test - test-jar - org.apache.flink - flink-test-utils + flink-connector-test-utils ${flink.version} test - org.apache.flink - flink-connector-test-utils + flink-streaming-java ${flink.version} test + test-jar - org.apache.flink flink-runtime @@ -124,7 +79,6 @@ limitations under the License. test-jar test - org.apache.flink flink-connector-base @@ -133,13 +87,6 @@ limitations under the License. test-jar - - org.apache.flink - flink-metrics-jmx - ${flink.version} - test - - org.apache.flink diff --git a/flink-sql-connector-clickhouse/pom.xml b/flink-sql-connector-clickhouse/pom.xml index e88a05a..3e8d192 100644 --- a/flink-sql-connector-clickhouse/pom.xml +++ b/flink-sql-connector-clickhouse/pom.xml @@ -27,47 +27,24 @@ limitations under the License. flink-sql-connector-clickhouse Flink : Connectors : SQL : Clickhouse https://flink.apache.org - jar UTF-8 + + + + org.apache.flink + flink-connector-clickhouse + ${project.version} + + - - com.diffplug.spotless - spotless-maven-plugin - ${spotless-maven-plugin.version} - - - - 1.7 - - - - - - org.apache.flink,org.apache.flink.shaded,,javax,java,scala,\# - - - - - - - - spotless-check - validate - - check - - - - org.apache.maven.plugins maven-shade-plugin - ${maven-shade-plugin.version} package @@ -77,10 +54,6 @@ limitations under the License. false - - org.apache.flink:flink-connector-base - org.apache.flink:flink-connector-clickhouse - log4j:* @@ -90,24 +63,20 @@ limitations under the License. - ru.yandex.clickhouse - ${shade.base}.ru.yandex.clickhouse - - - com.fasterxml - ${shade.base}.com.fasterxml + com.clickhouse + ${shade.base}.com.clickhouse org.apache.commons ${shade.base}.org.apache.commons - org.apache.http - ${shade.base}.org.apache.http + org.apache.hc.client5 + ${shade.base}.org.apache.hc.client5 - net.jpountz - ${shade.base}.net.jpountz + org.apache.hc.core5 + ${shade.base}.org.apache.hc.core5 diff --git a/pom.xml b/pom.xml index 147df00..9c8b5f8 100644 --- a/pom.xml +++ b/pom.xml @@ -57,25 +57,17 @@ limitations under the License. UTF-8 - 8 - 8 4.13.2 0.6.4 2.12 1.19.0 - provided - 32.1.3-jre - 2.12.4 3.13.0 1.19.8 5.2.1 5.2 org.apache.flink.shaded.clickhouse flink-connector-clickhouse-parent - 3.8.1 - 3.2.4 - 2.17 - 2.4.2 + false 2.5.3 @@ -86,32 +78,42 @@ limitations under the License. ${junit.version} test - - com.clickhouse - clickhouse-jdbc - ${clickhouse-jdbc.version} - - - org.apache.commons - commons-lang3 - ${commons-lang3.version} - - - - - org.apache.flink - flink-table-api-java - ${flink.version} - ${flink.scope} - - - org.apache.flink - flink-runtime - ${flink.version} - ${flink.scope} - + + + + com.clickhouse + clickhouse-jdbc + ${clickhouse-jdbc.version} + + + org.apache.httpcomponents.client5 + httpclient5 + ${httpclient5.version} + + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + + + + org.apache.flink + flink-connector-base + ${flink.version} + provided + + + org.apache.flink + flink-table-api-java-bridge + ${flink.version} + provided + true + + + + @@ -127,16 +129,16 @@ limitations under the License. - + org.apache.maven.plugins maven-jar-plugin - + com.github.siom79.japicmp japicmp-maven-plugin - 0.20.0 + 0.20.0 @@ -151,31 +153,63 @@ limitations under the License. com.diffplug.spotless spotless-maven-plugin + + ${spotless.skip} + org.apache.maven.plugins maven-compiler-plugin - org.apache.maven.plugins maven-surefire-plugin - org.apache.maven.plugins maven-enforcer-plugin - org.apache.maven.plugins maven-shade-plugin - org.commonjava.maven.plugins directory-maven-plugin + + + + java11 + + [11,) + + + false + 11 + + + + java17 + + [17,) + + + false + 17 + + + + java21 + + [21,) + + + true + 21 + + +