flink cdc 源码编译 打包
如果 发行版本 mysql cdc 出现bug,无法解决,那就的拉取源码 改代码,在重新编译了.
-
去掉不需要的 模块
<modules> <module>flink-cdc-base</module> <module>flink-connector-debezium</module> <module>flink-connector-test-util</module> <module>flink-connector-mysql-cdc</module> <!--<module>flink-connector-postgres-cdc</module> <module>flink-connector-oracle-cdc</module> <module>flink-connector-mongodb-cdc</module> <module>flink-connector-oceanbase-cdc</module> <module>flink-connector-sqlserver-cdc</module> <module>flink-connector-tidb-cdc</module>--> <module>flink-sql-connector-mysql-cdc</module> <!-- <module>flink-sql-connector-postgres-cdc</module> <module>flink-sql-connector-mongodb-cdc</module> <module>flink-sql-connector-oracle-cdc</module> <module>flink-sql-connector-oceanbase-cdc</module> <module>flink-sql-connector-sqlserver-cdc</module> <module>flink-sql-connector-tidb-cdc</module>--> <!-- <module>flink-cdc-e2e-tests</module>--> </modules>
去掉 Google 代码 检查
<!-- <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> <version>${spotless.version}</version> <configuration> <java> <googleJavaFormat> <version>1.7</version> <style>AOSP</style> </googleJavaFormat> <!– \# refers to the static imports –> <importOrder> <order>org.apache.flink,org.apache.flink.shaded,,javax,java,scala,\# </order> </importOrder> <removeUnusedImports/> </java> </configuration> <executions> <execution> <id>spotless-check</id> <phase>validate</phase> <goals> <goal>check</goal> </goals> </execution> </executions> </plugin>-->
mvn clean install -DskipTests ,可能会报错,升级jdk 或者 像我一样 加个泛型
image.png 编译成功 嘻嘻! image.png
网友评论