5

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

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245

3 Answers3

14

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"
    }
}
Sivaram Rasathurai
  • 5,533
  • 3
  • 22
  • 45
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.

Joe M
  • 2,527
  • 1
  • 25
  • 25
1

Correct entry should be,

repositories {
  mavenCentral()
  maven {
    url = uri("https://packages.confluent.io/maven")
  }
}
J K
  • 754
  • 6
  • 12