我正在尝试将Apache Flink与AWS Kinesis一起使用。 文档说我必须自己构建连接器。
因此,我构建了连接器,并为我的项目添加了jar文件,同时在pom.xml文件中添加了依赖项。
因此,我构建了连接器,并为我的项目添加了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 版本添加依赖。
mvn install:install-file -Dfile = flink-connector-kinesis_2.10-1.6.1.jar -DpomFile = flink-connector-kinesis_2.10-1.6.1.pom.xml
?這裡的困難在於你正在嘗試使用一個沒有在maven中央存儲庫中的依賴。我認為這個鏈接可能會有所幫助:http://www.mkyong.com/maven/how-to-include-library-manully-into-maven-local-repository/ - 0x26res