This is an automated email from the ASF dual-hosted git repository. leonard pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink-cdc.git
commit a35b8dd44cee7fab130e37025683e86ce5a3bb28 Author: wenmo <[email protected]> AuthorDate: Wed Mar 20 20:44:31 2024 +0800 [build] Optimize pom to solve the CI error --- .../flink-sql-connector-db2-cdc/pom.xml | 4 + .../flink-cdc-source-connectors/pom.xml | 10 + flink-cdc-dist/pom.xml | 10 + flink-cdc-runtime/pom.xml | 38 ++++ pom.xml | 238 ++++++++++----------- 5 files changed, 181 insertions(+), 119 deletions(-) diff --git a/flink-cdc-connect/flink-cdc-source-connectors/flink-sql-connector-db2-cdc/pom.xml b/flink-cdc-connect/flink-cdc-source-connectors/flink-sql-connector-db2-cdc/pom.xml index fbd908ccf..8f9960095 100644 --- a/flink-cdc-connect/flink-cdc-source-connectors/flink-sql-connector-db2-cdc/pom.xml +++ b/flink-cdc-connect/flink-cdc-source-connectors/flink-sql-connector-db2-cdc/pom.xml @@ -60,6 +60,10 @@ limitations under the License. <includes> <include>*:*</include> </includes> + <excludes> + <exclude>org.codehaus.janino:*</exclude> + <exclude>org.apache.calcite:*</exclude> + </excludes> </artifactSet> <filters> <filter> diff --git a/flink-cdc-connect/flink-cdc-source-connectors/pom.xml b/flink-cdc-connect/flink-cdc-source-connectors/pom.xml index ce0f972d0..13c9afa04 100644 --- a/flink-cdc-connect/flink-cdc-source-connectors/pom.xml +++ b/flink-cdc-connect/flink-cdc-source-connectors/pom.xml @@ -63,6 +63,16 @@ limitations under the License. <groupId>org.apache.flink</groupId> <artifactId>flink-cdc-runtime</artifactId> <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>org.codehaus.janino</groupId> + <artifactId>janino</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.calcite</groupId> + <artifactId>calcite-core</artifactId> + </exclusion> + </exclusions> </dependency> </dependencies> diff --git a/flink-cdc-dist/pom.xml b/flink-cdc-dist/pom.xml index 87582b4b6..dbbcd9117 100644 --- a/flink-cdc-dist/pom.xml +++ b/flink-cdc-dist/pom.xml @@ -67,6 +67,16 @@ limitations under the License. <goal>shade</goal> </goals> <configuration> + <filters> + <filter> + <artifact>*:*</artifact> + <excludes> + <exclude>META-INF/*.SF</exclude> + <exclude>META-INF/*.DSA</exclude> + <exclude>META-INF/*.RSA</exclude> + </excludes> + </filter> + </filters> <shadeTestJar>false</shadeTestJar> <createDependencyReducedPom>false</createDependencyReducedPom> <shadedArtifactAttached>false</shadedArtifactAttached> diff --git a/flink-cdc-runtime/pom.xml b/flink-cdc-runtime/pom.xml index 1e00a0da5..61a4b1f3b 100644 --- a/flink-cdc-runtime/pom.xml +++ b/flink-cdc-runtime/pom.xml @@ -34,6 +34,44 @@ limitations under the License. <version>${flink.version}</version> <scope>provided</scope> </dependency> + <dependency> + <!-- Used for code generation --> + <groupId>org.codehaus.janino</groupId> + <artifactId>janino</artifactId> + </dependency> + <dependency> + <!-- Used for translation of expression --> + <groupId>org.apache.calcite</groupId> + <artifactId>calcite-core</artifactId> + </dependency> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>flink-table-planner_2.12</artifactId> + <version>${flink.version}</version> + <scope>provided</scope> + <exclusions> + <exclusion> + <artifactId>value</artifactId> + <groupId>org.immutables</groupId> + </exclusion> + <exclusion> + <artifactId>value-annotations</artifactId> + <groupId>org.immutables</groupId> + </exclusion> + <exclusion> + <artifactId>commons-compiler</artifactId> + <groupId>org.codehaus.janino</groupId> + </exclusion> + <exclusion> + <artifactId>janino</artifactId> + <groupId>org.codehaus.janino</groupId> + </exclusion> + <exclusion> + <artifactId>flink-scala_2.12</artifactId> + <groupId>org.apache.flink</groupId> + </exclusion> + </exclusions> + </dependency> <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-cdc-common</artifactId> diff --git a/pom.xml b/pom.xml index ef0128ee9..a2104faac 100644 --- a/pom.xml +++ b/pom.xml @@ -115,6 +115,125 @@ limitations under the License. <artifactId>junit</artifactId> <version>${junit4.version}</version> </dependency> + + <dependency> + <!-- Used for code generation --> + <groupId>org.codehaus.janino</groupId> + <artifactId>janino</artifactId> + <version>${janino.version}</version> + </dependency> + + <dependency> + <!-- Used for translation of expression --> + <groupId>org.apache.calcite</groupId> + <artifactId>calcite-core</artifactId> + <!-- When updating the Calcite version, make sure to update the dependency exclusions --> + <version>${calcite.version}</version> + <exclusions> + <!-- + "mvn dependency:tree" as of Calcite 1.32.0: + [INFO] +- org.apache.calcite:calcite-core:jar:1.32.0:compile + [INFO] | +- org.apache.calcite:calcite-linq4j:jar:1.32.0:compile + [INFO] | +- org.locationtech.jts:jts-core:jar:1.19.0:compile + [INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.14.3:compile + [INFO] | +- org.apache.calcite.avatica:avatica-core:jar:1.22.0:compile + [INFO] | +- org.apiguardian:apiguardian-api:jar:1.1.2:compile + [INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.14.3:compile + [INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.14.3:compile + [INFO] | +- com.jayway.jsonpath:json-path:jar:2.7.0:runtime + [INFO] | | \- net.minidev:json-smart:jar:2.4.7:runtime + [INFO] | | \- net.minidev:accessors-smart:jar:2.4.7:runtime + [INFO] | | \- org.ow2.asm:asm:jar:9.1:runtime + [INFO] | +- commons-codec:commons-codec:jar:1.15:runtime + [INFO] | \- commons-io:commons-io:jar:2.11.0:runtime + Dependencies that are not needed for how we use Calcite right now. + --> + <exclusion> + <groupId>org.apache.calcite.avatica</groupId> + <artifactId>avatica-server</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.calcite.avatica</groupId> + <artifactId>avatica-metrics</artifactId> + </exclusion> + <exclusion> + <groupId>com.google.protobuf</groupId> + <artifactId>protobuf-java</artifactId> + </exclusion> + <exclusion> + <groupId>com.google.uzaygezen</groupId> + <artifactId>uzaygezen-core</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpcore</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.commons</groupId> + <artifactId>commons-dbcp2</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + </exclusion> + <exclusion> + <groupId>com.fasterxml.jackson.dataformat</groupId> + <artifactId>jackson-dataformat-yaml</artifactId> + </exclusion> + <exclusion> + <groupId>com.yahoo.datasketches</groupId> + <artifactId>sketches-core</artifactId> + </exclusion> + <exclusion> + <groupId>net.hydromatic</groupId> + <artifactId>aggdesigner-algorithm</artifactId> + </exclusion> + <exclusion> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_annotations</artifactId> + </exclusion> + <exclusion> + <groupId>org.jetbrains</groupId> + <artifactId>annotations</artifactId> + </exclusion> + <exclusion> + <groupId>org.jetbrains.kotlin</groupId> + <artifactId>kotlin-stdlib-jdk8</artifactId> + </exclusion> + <exclusion> + <groupId>org.codehaus.janino</groupId> + <artifactId>janino</artifactId> + </exclusion> + <exclusion> + <groupId>org.codehaus.janino</groupId> + <artifactId>commons-compiler</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.httpcomponents.client5</groupId> + <artifactId>httpclient5</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.httpcomponents.core5</groupId> + <artifactId>httpcore5</artifactId> + </exclusion> + <exclusion> + <groupId>org.checkerframework</groupId> + <artifactId>checker-qual</artifactId> + </exclusion> + <exclusion> + <groupId>org.locationtech.jts.io</groupId> + <artifactId>jts-io-common</artifactId> + </exclusion> + <exclusion> + <groupId>org.locationtech.proj4j</groupId> + <artifactId>proj4j</artifactId> + </exclusion> + </exclusions> + </dependency> </dependencies> </dependencyManagement> @@ -170,125 +289,6 @@ limitations under the License. <optional>true</optional> </dependency> - <dependency> - <!-- Used for code generation --> - <groupId>org.codehaus.janino</groupId> - <artifactId>janino</artifactId> - <version>${janino.version}</version> - </dependency> - - <dependency> - <!-- Used for translation of expression --> - <groupId>org.apache.calcite</groupId> - <artifactId>calcite-core</artifactId> - <!-- When updating the Calcite version, make sure to update the dependency exclusions --> - <version>${calcite.version}</version> - <exclusions> - <!-- - "mvn dependency:tree" as of Calcite 1.32.0: - [INFO] +- org.apache.calcite:calcite-core:jar:1.32.0:compile - [INFO] | +- org.apache.calcite:calcite-linq4j:jar:1.32.0:compile - [INFO] | +- org.locationtech.jts:jts-core:jar:1.19.0:compile - [INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.14.3:compile - [INFO] | +- org.apache.calcite.avatica:avatica-core:jar:1.22.0:compile - [INFO] | +- org.apiguardian:apiguardian-api:jar:1.1.2:compile - [INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.14.3:compile - [INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.14.3:compile - [INFO] | +- com.jayway.jsonpath:json-path:jar:2.7.0:runtime - [INFO] | | \- net.minidev:json-smart:jar:2.4.7:runtime - [INFO] | | \- net.minidev:accessors-smart:jar:2.4.7:runtime - [INFO] | | \- org.ow2.asm:asm:jar:9.1:runtime - [INFO] | +- commons-codec:commons-codec:jar:1.15:runtime - [INFO] | \- commons-io:commons-io:jar:2.11.0:runtime - Dependencies that are not needed for how we use Calcite right now. - --> - <exclusion> - <groupId>org.apache.calcite.avatica</groupId> - <artifactId>avatica-server</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.calcite.avatica</groupId> - <artifactId>avatica-metrics</artifactId> - </exclusion> - <exclusion> - <groupId>com.google.protobuf</groupId> - <artifactId>protobuf-java</artifactId> - </exclusion> - <exclusion> - <groupId>com.google.uzaygezen</groupId> - <artifactId>uzaygezen-core</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpcore</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.commons</groupId> - <artifactId>commons-dbcp2</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.commons</groupId> - <artifactId>commons-lang3</artifactId> - </exclusion> - <exclusion> - <groupId>com.fasterxml.jackson.dataformat</groupId> - <artifactId>jackson-dataformat-yaml</artifactId> - </exclusion> - <exclusion> - <groupId>com.yahoo.datasketches</groupId> - <artifactId>sketches-core</artifactId> - </exclusion> - <exclusion> - <groupId>net.hydromatic</groupId> - <artifactId>aggdesigner-algorithm</artifactId> - </exclusion> - <exclusion> - <groupId>com.google.errorprone</groupId> - <artifactId>error_prone_annotations</artifactId> - </exclusion> - <exclusion> - <groupId>org.jetbrains</groupId> - <artifactId>annotations</artifactId> - </exclusion> - <exclusion> - <groupId>org.jetbrains.kotlin</groupId> - <artifactId>kotlin-stdlib-jdk8</artifactId> - </exclusion> - <exclusion> - <groupId>org.codehaus.janino</groupId> - <artifactId>janino</artifactId> - </exclusion> - <exclusion> - <groupId>org.codehaus.janino</groupId> - <artifactId>commons-compiler</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.httpcomponents.client5</groupId> - <artifactId>httpclient5</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.httpcomponents.core5</groupId> - <artifactId>httpcore5</artifactId> - </exclusion> - <exclusion> - <groupId>org.checkerframework</groupId> - <artifactId>checker-qual</artifactId> - </exclusion> - <exclusion> - <groupId>org.locationtech.jts.io</groupId> - <artifactId>jts-io-common</artifactId> - </exclusion> - <exclusion> - <groupId>org.locationtech.proj4j</groupId> - <artifactId>proj4j</artifactId> - </exclusion> - </exclusions> - </dependency> - <!-- test dependencies --> <dependency> <groupId>org.hamcrest</groupId>
