Unable to resolve confluent kafka dependencies in gradle?
Asked Answered
S

3

6

While adding dependencies for confluent kafka in build gradle file, its unable to resolve it.

   compile group: 'io.confluent', name: 'kafka-avro-serializer', version: '4.0.0'
   compile group: 'io.confluent', name: 'kafka-schema-registry', version: '4.0.0'
   compile 'io.confluent:kafka-schema-registry:4.0.0:tests'

After adding giving following error .

enter image description here

Sung answered 23/5, 2020 at 15:45 Comment(0)
A
15

You have to add the confluent repository to look at the dependencies. Inside the repositories block, you have to add the confluent maven repository. Please note that my gradle version is 7.1

repositories {
    mavenCentral()
    maven {
        url "https://packages.confluent.io/maven"
    }
}
Ait answered 29/11, 2021 at 6:54 Comment(0)
B
7

Those dependencies are in the confluent repository (not in Maven central). You will need to declare https://packages.confluent.io/maven/ as a repository. See this on how this can be done.

Binghi answered 24/5, 2020 at 23:8 Comment(0)
T
3

Correct entry should be,

repositories {
  mavenCentral()
  maven {
    url = uri("https://packages.confluent.io/maven")
  }
}
Trott answered 23/6, 2022 at 4:5 Comment(1)
This is for KotlinMadelle

© 2022 - 2024 — McMap. All rights reserved.