Flink如何编译,版本1.12.5
1 前置版本选择
名称 | 版本 |
---|---|
Flink | 1.12.5 |
JDK | jdk8_281 |
Maven | 3.6.3 |
1.2 Maven编译所用的settings
<?xml version="1.0" encoding="UTF-8"?>
nexus-aliyun
*,!jeecg,!jeecg-snapshots,!mapr-releases,!confluent
Nexus aliyun
http://maven.aliyun.com/nexus/content/groups/public
mapr-public
mapr-releases
mapr-releases
https://maven.aliyun.com/repository/mapr-public
rdc-releases
qQYXR5
nV7g4WsFuQ
rdc-snapshots
qQYXR5
nV7g4WsFuQ
nexus
central
http://maven.aliyun.com/nexus/content/groups/public
true
false
snapshots
http://maven.aliyun.com/nexus/content/groups/public
false
true
rdc-releases
https://repo.rdc.aliyun.com/repository/107061-release-T5BkKR/
true
false
rdc-snapshots
https://repo.rdc.aliyun.com/repository/107061-snapshot-dVxDss/
false
true
confluent
http://packages.confluent.io/maven/
central
http://maven.aliyun.com/nexus/content/groups/public
true
false
snapshots
http://maven.aliyun.com/nexus/content/groups/public
false
true
rdc-releases
https://repo.rdc.aliyun.com/repository/107061-release-T5BkKR/
true
false
rdc-snapshots
https://repo.rdc.aliyun.com/repository/107061-snapshot-dVxDss/
false
true
nexus
2 下载地址
github-Flink
华为镜像
3 编译命令
3.1 格式化
mvn spotless:apply
3.2 编译
官网提供的命令是:
mvn clean install -DskipTests -Dfast
我是用的是:
mvn clean install -Dmaven.javadoc.skip=true -DskipTests -Dcheckstyle.skip=true -Drat.skip=true
4 编译结果
5 编译过程遇到的问题
5.1 flink-runtime-web模块,可以注释掉(不需要的话)
我在构建flink-runtime-web
模块时出错,而我不需要,所以注释掉了
5.2 各类jar找不到,下载不到
可以直接去https://mvnrepository.com
下载,用maven命令将jar包移动到本地repository中
mvn install:install-file -Dfile=jar包的位置(参数一) -DgroupId=groupId(参数二) -DartifactId=artifactId(参数三) -Dversion=version(参数四) -Dpackaging=jar