无法将flink导入项目

yv5phkfx  于 2021-06-25  发布在  Flink
关注(0)|答案(1)|浏览(312)

所以我用这个安装了一个flink项目示例。https://github.com/tillrohrmann/flink-project.g8
我正在尝试使用这个模板,它让我可以开始编写一个flink摄取应用程序,而不必担心依赖性,但事与愿违。结果发现,当我尝试与sbt同步时,我找不到flink(不会撒谎,但这部分对我来说甚至是模糊的)。想知道是否有人知道如何让我的项目找到Flink。很高兴使用这项技术。

Error while importing sbt project:

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0
[info] Loading project definition from /Users/Sam/IdeaProjects/cryptoingestion/project
[info] Set current project to cryptoingestion (in build file:/Users/Sam/IdeaProjects/cryptoingestion/)
>
[info] Defining */*:sbtStructureOptions, */*:sbtStructureOutputFile, root/*:shellPrompt
[info] The new values will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to cryptoingestion (in build file:/Users/Sam/IdeaProjects/cryptoingestion/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from /Users/Sam/Library/Application Support/IdeaIC2017.3/Scala/launcher/sbt-structure-0.13.jar
[info] Reapplying settings...
[info] Set current project to cryptoingestion (in build file:/Users/Sam/IdeaProjects/cryptoingestion/)
[info] Updating {file:/Users/Sam/IdeaProjects/cryptoingestion/}root...
[info] Resolving org.scala-lang#scala-library;2.12.2 ...
[info] Resolving org.apache.flink#flink-scala_2.12;1.3.2 ...
[info] Resolving org.apache.flink#flink-scala_2.12;1.3.2 ...
[warn]  module not found: org.apache.flink#flink-scala_2.12;1.3.2
[warn] ==== local: tried
[warn]   /Users/Sam/.ivy2/local/org.apache.flink/flink-scala_2.12/1.3.2/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/apache/flink/flink-scala_2.12/1.3.2/flink-scala_2.12-1.3.2.pom
[warn] ==== local-preloaded-ivy: tried
[warn]   /Users/Sam/.sbt/preloaded/org.apache.flink/flink-scala_2.12/1.3.2/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn]   file:////Users/Sam/.sbt/preloaded/org/apache/flink/flink-scala_2.12/1.3.2/flink-scala_2.12-1.3.2.pom
[warn] ==== Apache Development Snapshot Repository: tried
[warn]   https://repository.apache.org/content/repositories/snapshots/org/apache/flink/flink-scala_2.12/1.3.2/flink-scala_2.12-1.3.2.pom
[warn] ==== Maven2 Local: tried
[warn]   file:/Users/Sam/.m2/repository/org/apache/flink/flink-scala_2.12/1.3.2/flink-scala_2.12-1.3.2.pom
[info] Resolving org.apache.flink#flink-streaming-scala_2.12;1.3.2 ...
[info] Resolving org.apache.flink#flink-streaming-scala_2.12;1.3.2 ...
[warn]  module not found: org.apache.flink#flink-streaming-scala_2.12;1.3.2
[warn] ==== local: tried
[warn]   /Users/Sam/.ivy2/local/org.apache.flink/flink-streaming-scala_2.12/1.3.2/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/apache/flink/flink-streaming-scala_2.12/1.3.2/flink-streaming-scala_2.12-1.3.2.pom
[warn] ==== local-preloaded-ivy: tried
[warn]   /Users/Sam/.sbt/preloaded/org.apache.flink/flink-streaming-scala_2.12/1.3.2/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn]   file:////Users/Sam/.sbt/preloaded/org/apache/flink/flink-streaming-scala_2.12/1.3.2/flink-streaming-scala_2.12-1.3.2.pom
[warn] ==== Apache Development Snapshot Repository: tried
[warn]   https://repository.apache.org/content/repositories/snapshots/org/apache/flink/flink-streaming-scala_2.12/1.3.2/flink-streaming-scala_2.12-1.3.2.pom
[warn] ==== Maven2 Local: tried
[warn]   file:/Users/Sam/.m2/repository/org/apache/flink/flink-streaming-scala_2.12/1.3.2/flink-streaming-scala_2.12-1.3.2.pom
[info] Resolving org.scala-lang#scala-compiler;2.12.2 ...
[info] Resolving org.scala-lang#scala-reflect;2.12.2 ...
[info] Resolving org.scala-lang.modules#scala-xml_2.12;1.0.6 ...
[info] Resolving jline#jline;2.14.3 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.apache.flink#flink-scala_2.12;1.3.2: not found
[warn]  :: org.apache.flink#flink-streaming-scala_2.12;1.3.2: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]  Note: Unresolved dependencies path:
[warn]      org.apache.flink:flink-scala_2.12:1.3.2 (/Users/Sam/IdeaProjects/cryptoingestion/build.sbt#L22)
[warn]        +- com.cryptocorp:cryptoingestion_2.12:0.1
[warn]      org.apache.flink:flink-streaming-scala_2.12:1.3.2 (/Users/Sam/IdeaProjects/cryptoingestion/build.sbt#L22)
[warn]        +- com.cryptocorp:cryptoingestion_2.12:0.1
[trace] Stack trace suppressed: run 'last mainRunner/*:ssExtractDependencies' for the full output.
[trace] Stack trace suppressed: run 'last root/*:ssExtractDependencies' for the full output.
[trace] Stack trace suppressed: run 'last root/*:update' for the full output.
[error] (mainRunner/*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.apache.flink#flink-scala_2.12;1.3.2: not found
[error] unresolved dependency: org.apache.flink#flink-streaming-scala_2.12;1.3.2: not found
[error] (root/*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.apache.flink#flink-scala_2.12;1.3.2: not found
[error] unresolved dependency: org.apache.flink#flink-streaming-scala_2.12;1.3.2: not found
[error] (root/*:update) sbt.ResolveException: unresolved dependency: org.apache.flink#flink-scala_2.12;1.3.2: not found
[error] unresolved dependency: org.apache.flink#flink-streaming-scala_2.12;1.3.2: not found
[error] Total time: 2 s, completed Dec 5, 2017 12:51:24 AM

编辑:我得到的项目,以建立,但我不能在我的ide点击左右。我的意思是,当我试图进入一个flink类时,它找不到声明。

jdgnovmf

jdgnovmf1#

FlinkScala目前只支持Scala2.10和2.11,因此您必须将scala降级到这些版本之一,或者使用其java接口。

相关问题