gpt4 book ai didi

scala - 用于融合平台的 sbt 解析器

转载 作者:行者123 更新时间:2023-12-05 00:48:20 24 4
gpt4 key购买 nike

我无法在我的 sbt.我看了pom example并找到了在 maven 中添加 repo 的定义。

<repositories>
<repository>
<id>confluent</id>
<url>https://packages.confluent.io/maven/</url>
</repository>

<!-- further repository entries here -->

</repositories>

和依赖关系

<dependencies>

<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.11</artifactId>
<version>2.0.0-cp1</version>
</dependency>

<!-- further dependency entries here -->

</dependencies>

我用过

resolvers += Resolver.url("confluent", url("http://packages.confluent.io/maven/")) in build.sbt`

并将依赖项声明为

libraryDependencies += "org.apache.kafka" % "kafka-clients" % "2.0.0-cp1"
libraryDependencies += "org.apache.kafka" %% "kafka" % "2.0.0-cp1"

我还是明白了

::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.apache.kafka#kafka-clients;2.0.0-cp1: not found
[warn] :: org.apache.kafka#kafka_2.12;2.0.0-cp1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::

正确的做法应该是什么?我的 build.sbt

name := "kafka-Test"

version := "1.0"

scalaVersion := "2.12.3"


resolvers += Resolver.url("confluent", url("https://packages.confluent.io/maven/"))

libraryDependencies += "org.apache.kafka" % "kafka-clients" % "2.0.0-cp1"
libraryDependencies += "org.apache.kafka" %% "kafka" % "2.0.0-cp1"

最佳答案

问题出在您的解析器定义中。应该是:

resolvers += "confluent" at "https://packages.confluent.io/maven/"

我刚刚尝试过,它有效。

关于scala - 用于融合平台的 sbt 解析器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52072076/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com