猫不急

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

参考

https://blog.csdn.net/hxpjava1/article/details/88901521

https://blog.csdn.net/yulei_qq/article/details/93628864

https://www.cnblogs.com/zhisheng/p/10672709.html

https://blog.csdn.net/h335146502/article/details/96483310

https://blog.csdn.net/qq475781638/article/details/90260202

 

下载blink源代码

wget https://github.com/apache/flink/archive/release-1.9.1.tar.gz

tar zxvf release-1.9.1.tar.gz

 

maven的setting

<mirror>
  <id>nexus-aliyun</id>
  <mirrorOf>*,!jeecg,!jeecg-snapshots,!mapr-releases</mirrorOf>
  <name>Nexus aliyun</name>
  <url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>

<mirror>
  <id>mapr-public</id>
  <mirrorOf>mapr-releases</mirrorOf>
  <name>mapr-releases</name>
  <url>https://maven.aliyun.com/repository/mapr-public</url>
</mirror>

 

解决NPM源问题

vi flink-release-1.9.1/flink-runtime-web/pom.xml

<plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>install node and npm</id>
                        <goals>
                            <goal>install-node-and-npm</goal>
                        </goals>
                        <configuration>
                            <nodeVersion>v10.9.0</nodeVersion>
                        </configuration>
                    </execution>
                    <execution>
                        <id>npm install</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>ci --cache-max=0 --no-save</arguments>
                            <npmRegistryURL>https://registry.npm.taobao.org</npmRegistryURL>
                            <environmentVariables>
                                <HUSKY_SKIP_INSTALL>true</HUSKY_SKIP_INSTALL>
                            </environmentVariables>
                        </configuration>
                    </execution>
                    <execution>
                        <id>npm run build</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>run build</arguments>
                            <npmRegistryURL>https://registry.npm.taobao.org</npmRegistryURL>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <workingDirectory>web-dashboard</workingDirectory>
                </configuration>
            </plugin>

 

 补充缺少的包

wget http://packages.confluent.io/maven/io/confluent/kafka-schema-registry-client/3.3.1/kafka-schema-registry-client-3.3.1.jar

mvn install:install-file -DgroupId=io.confluent -DartifactId=kafka-schema-registry-client -Dversion=3.3.1 -Dpackaging=jar -Dfile=/opt/buildsoft/flinkbuild/depjar/kafka-schema-registry-client-3.3.1.jar

 

添加flink-shaded依赖

# 用的是hadoop2.7.7 所以用0.7版本,如果不清楚,先构建一次,再看需要哪个版本
git clone -b release-7.0 https://github.com/apache/flink-shaded.git
cd flink-shaded
mvn clean install -DskipTests -Dhadoop.version=2.7.7

 

 

进行构建

mvn clean install -DskipTests  -Dhadoop.version=2.7.7 -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true

 

完成后到flink-dist下继续构建

mvn clean install -DskipTests  -Dhadoop.version=2.7.7 -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true

 

到flink-release-1.9.1/flink-dist/target/flink-1.9.1-bin/flink-1.9.1目录下查看编译出的文件

 

最后可以不编译直接下载:

https://flink.apache.org/downloads.html

 

posted on 2019-11-04 17:44  猫不急  阅读(442)  评论(0编辑  收藏  举报