Alon
Alon

Reputation: 11885

Error downloading net.cakesolutions:scala-kafka-client - Not Found

I'm trying to install Kafka in my sbt, but when I click on "import changes" I'm getting an error:

[error] stack trace is suppressed; run 'last update' for the full output [error] stack trace is suppressed; run 'last ssExtractDependencies' for the full output [error] (update) sbt.librarymanagement.ResolveException: Error downloading net.cakesolutions:scala-kafka-client_2.13:2.3.1 [error] Not found [error] Not found [error] not found: C:\Users\macca.ivy2\local\net.cakesolutions\scala-kafka-client_2.13\2.3.1\ivys\ivy.xml [error] not found: https://repo1.maven.org/maven2/net/cakesolutions/scala-kafka-client_2.13/2.3.1/scala-kafka-client_2.13-2.3.1.pom [error] (ssExtractDependencies) sbt.librarymanagement.ResolveException: Error downloading net.cakesolutions:scala-kafka-client_2.13:2.3.1 [error] Not found [error] Not found [error] not found: C:\Users\macca.ivy2\local\net.cakesolutions\scala-kafka-client_2.13\2.3.1\ivys\ivy.xml [error] not found: https://repo1.maven.org/maven2/net/cakesolutions/scala-kafka-client_2.13/2.3.1/scala-kafka-client_2.13-2.3.1.pom [error] Total time: 1 s, completed 19:56:34 26/04/2020 [info] shutting down sbt server

build.sbt:

name := "KafkaProducer"

version := "0.1"

scalaVersion := "2.13.0"

libraryDependencies ++= Seq(
  "io.circe" %% "circe-parser" % "0.12.3",
  "net.cakesolutions" %% "scala-kafka-client" % "2.3.1"
)

Upvotes: 0

Views: 988

Answers (2)

Alon
Alon

Reputation: 11885

As of today Scala is still not binary compatible between versions and has tendency to serious breaking changes between "minor" (2.10 -> 2.11 -> 2.12 -> 2.13) releases.

It leads to situation where maintainers are relatively slow in adopting new versions.

e.g. Apache Spark barely started supporting 2.12 in the last stable version.

And even to the point where it is a default one.

So if I want to run this with 2.13 I have three options:

  1. sbt publish-local
  2. Using standard Java client instead
  3. Nagging maintainer of Scala package to publish artificats

But I've decided to solve it by just downgrading Scala to 2.12

Upvotes: 0

Levi Ramsey
Levi Ramsey

Reputation: 20541

Per the github page for scala-kafka-client, you'll need to add a bintray resolver to your build.sbt:

resolvers += Resolver.bintrayRepo("cakesolutions", "maven")

Upvotes: 2

Related Questions