我正在尝试将Apache Flink与AWS Kinesis一起使用。该文件说我必须自己构建连接器。
因此,我构建了连接器并为项目添加了JAR文件,还将依赖性放在我的pom.xml文件上。
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-kinesis_2.11</artifactId>
<version>1.6.1</version>
</dependency>
但是,当我尝试使用mvn clean package
构建时,我收到了这样的错误消息
[INFO] -----------------------< kkaldk:flink-kinesis >-----------------------
[INFO] Building Flink Quickstart Job 0.1
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.apache.flink:flink-connector-kinesis_2.11:jar:1.6-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.458 s
[INFO] Finished at: 2018-12-19T17:45:43+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project flink-kinesis: Could not resolve dependencies for project kkaldk:flink-kinesis:jar:0.1: Failure to find org.apache.flink:flink-connector-kinesis_2.11:jar:1.6-SNAPSHOT in https://repository.apache.org/content/repositories/snapshots/ was cached in the local repository, resolution will not be reattempted until the update interval of apache.snapshots has elapsed or updates are forced ->
[Help 1]
[ERROR]
您能帮我解决这个问题吗?
--------添加--------------
这就是我所做的(这是错误的过程)
- 开始按照此文档开始项目
- Flink Master Source(1.8-Snapshot)构建连接器
- 使用1.6.1版本添加依赖项。
这是我为解决方案所做的。
-
我从这里下载了1.6.1释放。
-
解压缩文件(档案将在
.../flink-release-1.6.1/
中取消拉链 由
mvn clean install -Pinclude-kinesis -DskipTests
构建
然后我有flink-connector-kinesis_2.11版本1.6.1在我的本地maven存储库中
(对我来说,路径就是这样): ~/.m2/repository/org/apache/flink/flink-connector-kinesis_2.11
之后,我可以通过与此代码添加依赖关系在任何项目中使用此连接器。(我不必再添加JAR文件了。)
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-kinesis_2.11</artifactId>
<version>1.6.1</version>
</dependency>