[FLINK-35071][cdc-connector][cdc-base] Shade guava31 to avoid dependency conflict with flink below 1.18
As shown in https://github.com/ververica/flink-cdc-connectors/issues/3071, Unlike flink-table-common、flink-connector-base 、flink-core whose maven scope is provided , flink-shaded-guava and flink-shaded-force-shading will be included in the final jar package, so maybe cause dependency conflict.
Now we can see why dependency conflict occurs:
- Since Flink 1.18, version of guava is upgrade from 30 to 31 (using 31.1-jre-17.0)
-
Since CDC 3.0.1, version of guava is also upgrade from 30 to 31 (using 31.1-jre-17.0)
-
So CDC 3.0.1 is compatible with Flink 1.18, CDC 2.x is is compatible with Flink 1.13-1.17. CDC 2.x and Flink 1.18 dependency conflict, CDC 3.0.1 and Flink 1.17(or earlier version) dependency conflict. (https://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html#relocations) in pom.xml.
@PatrickRen , CC?
Seems there's some conflicts between master branch, could @loserwang1024 please rebase it when you're available?
The CI failed, could you fix it ? @loserwang1024