【问题标题】:Not able to download Jars from Confluent repository in a gradle project无法从 gradle 项目中的 Confluent 存储库下载 Jars
【发布时间】:2020-08-29 02:32:23
【问题描述】:

我已经在 build.gradle 文件中添加了 confluent repo

 repositories {
        gradlePluginPortal()
        mavenCentral()
        maven {
            url "https://packages.confluent.io/maven/"
        }
    }

但我无法下载依赖项

compile("io.confluent:kafka-avro-serializer:3.2.1")

【问题讨论】:

  • 它是否偶然在buildscript 块中?
  • 它在构建脚本之外

标签: gradle apache-kafka kafka-producer-api


【解决方案1】:

我想在子项目中使用它,所以在父 build.gradle 中我必须添加如下内容,这对我来说很好。

subprojects {
repositories {
  maven {
            url "https://packages.confluent.io/maven/"
        }
    }
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-08-30
    • 2018-04-29
    • 2018-10-29
    • 2020-06-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-20
    相关资源
    最近更新 更多