找不到 io.confluence:kafka-protobuf-serializer:6.0.0

2024-05-09

直接的问题是:为什么 Gradle 没有解决我添加的这个依赖关系

dependencies {

    //kafka-protobuf-serializer
    implementation("io.confluent:kafka-protobuf-serializer:6.0.0")
}

?

根据mvn https://mvnrepository.com/artifact/io.confluent/kafka-protobuf-serializer/6.0.0这就是我在 build.gradle 中添加此类依赖项的方法

compile group: 'io.confluent', name: 'kafka-protobuf-serializer', version: '6.0.0'

我的所有其他依赖项都添加了“实现...”。到目前为止,一切都很好。但对于这个具体我得到了

Execution failed for task ':extractIncludeProto'.
> Could not resolve all files for configuration ':compileProtoPath'.
   > Could not find io.confluent:kafka-protobuf-serializer:6.0.0.
     Searched in the following locations:
       - file:/C:/Users/Cast/.m2/repository/io/confluent/kafka-protobuf-serializer/6.0.0/kafka-protobuf-serializer-6.0.0.pom
       - https://jcenter.bintray.com/io/confluent/kafka-protobuf-serializer/6.0.0/kafka-protobuf-serializer-6.0.0.pom
     Required by:
         project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

我在这里缺少或弄乱了什么?

这是整个 build.gradle

plugins {
    id "org.jetbrains.kotlin.jvm" version "1.3.72"
    id "org.jetbrains.kotlin.kapt" version "1.3.72"
    id "org.jetbrains.kotlin.plugin.allopen" version "1.3.72"
    id "application"
    id 'com.google.protobuf' version '0.8.13'
}

version "0.2"
group "account-control"

repositories {
    mavenLocal()
    jcenter()
}

configurations {
    // for dependencies that are needed for development only
    developmentOnly
}

dependencies {
    kapt(enforcedPlatform("io.micronaut:micronaut-bom:$micronautVersion"))
    kapt("io.micronaut:micronaut-inject-java")
    kapt("io.micronaut:micronaut-validation")

    implementation(enforcedPlatform("io.micronaut:micronaut-bom:$micronautVersion"))
    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
    implementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion")
    implementation("io.micronaut:micronaut-runtime")
//    implementation("io.micronaut.grpc:micronaut-grpc-runtime")
    implementation("io.micronaut.grpc:micronaut-grpc-server-runtime:$micronautGrpcVersion")
    implementation("io.micronaut.grpc:micronaut-grpc-client-runtime:$micronautGrpcVersion")
    implementation("io.grpc:grpc-kotlin-stub:${grpcKotlinVersion}")

    //Kafka
    implementation("io.micronaut.kafka:micronaut-kafka")

    //vertx
    implementation("io.micronaut.sql:micronaut-vertx-mysql-client")
    //implementation("io.micronaut.configuration:micronaut-vertx-mysql-client")
    compile 'io.vertx:vertx-lang-kotlin:3.9.4'

    //mongodb
    implementation("org.mongodb:mongodb-driver-reactivestreams:4.1.1")

    //kafka-protobuf-serializer
    implementation("io.confluent:kafka-protobuf-serializer:6.0.0")

    runtimeOnly("ch.qos.logback:logback-classic:1.2.3")
    runtimeOnly("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.8")

    kaptTest("io.micronaut:micronaut-inject-java")

    testImplementation enforcedPlatform("io.micronaut:micronaut-bom:$micronautVersion")
    testImplementation("org.junit.jupiter:junit-jupiter-api:5.3.0")
    testImplementation("io.micronaut.test:micronaut-test-junit5")
    testImplementation("org.mockito:mockito-junit-jupiter:2.22.0")

    testRuntime("org.junit.jupiter:junit-jupiter-engine:5.3.0")
    testRuntime("org.jetbrains.spek:spek-junit-platform-engine:1.1.5")
}

test.classpath += configurations.developmentOnly

mainClassName = "account-control.Application"

test {
    useJUnitPlatform()
}

allOpen {
    annotation("io.micronaut.aop.Around")
}

compileKotlin {
    kotlinOptions {
        jvmTarget = '11' 
        //Will retain parameter names for Java reflection
        javaParameters = true 
    }
}
//compileKotlin.dependsOn(generateProto)

compileTestKotlin {
    kotlinOptions {
        jvmTarget = '11' 
        javaParameters = true 
    }
}

tasks.withType(JavaExec) {
    classpath += configurations.developmentOnly
    jvmArgs('-XX:TieredStopAtLevel=1', '-Dcom.sun.management.jmxremote')
}

sourceSets {
    main {
        java {
            srcDirs 'build/generated/source/proto/main/grpc'
            srcDirs 'build/generated/source/proto/main/grpckt'
            srcDirs 'build/generated/source/proto/main/java'
        }
    }
}

protobuf {
    protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
    plugins {
        grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" }
        grpckt { artifact = "io.grpc:protoc-gen-grpc-kotlin:${grpcKotlinVersion}" }
    }
    generateProtoTasks {
        all()*.plugins {
            grpc {}
            grpckt {}
        }
    }
}

*** 第一版

    Execution failed for task ':extractIncludeProto'.
    > Could not resolve all files for configuration ':compileProtoPath'.
       > Could not resolve com.squareup.wire:wire-schema:3.2.2.
         Required by:
             project : > io.confluent:kafka-protobuf-serializer:6.0.0 > io.confluent:kafka-protobuf-provider:6.0.0
          > The consumer was configured to find a component, preferably only the resources files. However we cannot choose between the following variants of com.squareup.wire:wire-schema:3.2.2:
              - jvm-api
              - jvm-runtime
              - metadata-api
            All of them match the consumer attributes:
              - Variant 'jvm-api' capability com.squareup.wire:wire-schema:3.2.2 declares a component, packaged as a jar:
                  - Unmatched attributes:
                      - Provides release status but the consumer didn't ask for it
                      - Provides an API but the consumer didn't ask for it
                      - Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but the consumer didn't ask for it
              - Variant 'jvm-runtime' capability com.squareup.wire:wire-schema:3.2.2 declares a component, packaged as a jar:
                  - Unmatched attributes:
                      - Provides release status but the consumer didn't ask for it
                      - Provides a runtime but the consumer didn't ask for it
                      - Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but the consumer didn't ask for it
              - Variant 'metadata-api' capability com.squareup.wire:wire-schema:3.2.2:
                  - Unmatched attributes:
                      - Doesn't say anything about its elements (required them preferably only the resources files)
                      - Provides release status but the consumer didn't ask for it
                      - Provides a usage of 'kotlin-api' but the consumer didn't ask for it
                      - Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'common' but the consumer didn't ask for it
    
    * Try:
    Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    
    * Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':extractIncludeProto'.
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:38)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at 
...

        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
    Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.squareup.wire:wire-schema:3.2.2.
    Required by:
        project : > io.confluent:kafka-protobuf-serializer:6.0.0 > io.confluent:kafka-protobuf-provider:6.0.0
    Caused by: org.gradle.internal.component.AmbiguousConfigurationSelectionException: The consumer was configured to find a component, preferably only the resources files. However we cannot choose between the following variants of com.squareup.wire:wire-schema:3.2.2:
      - jvm-api
      - jvm-runtime
      - metadata-api
    All of them match the consumer attributes:
      - Variant 'jvm-api' capability com.squareup.wire:wire-schema:3.2.2 declares a component, packaged as a jar:
          - Unmatched attributes:
              - Provides release status but the consumer didn't ask for it
              - Provides an API but the consumer didn't ask for it
              - Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but the consumer didn't ask for it
      - Variant 'jvm-runtime' capability com.squareup.wire:wire-schema:3.2.2 declares a component, packaged as a jar:
          - Unmatched attributes:
              - Provides release status but the consumer didn't ask for it
              - Provides a runtime but the consumer didn't ask for it
              - Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but the consumer didn't ask for it
      - Variant 'metadata-api' capability com.squareup.wire:wire-schema:3.2.2:
          - Unmatched attributes:
              - Doesn't say anything about its elements (required them preferably only the resources files)
              - Provides release status but the consumer didn't ask for it
              - Provides a usage of 'kotlin-api' but the consumer didn't ask for it
              - Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'common' but the consumer didn't ask for it
        at org.gradle.internal.component.model.AttributeConfigurationSelector.selectConfigurationUsingAttributeMatching(AttributeConfigurationSelector.java:105)
        at org.gradle.internal.component.model.AttributeConfigurationSelector.selectConfigurationUsingAttributeMatching(AttributeConfigurationSelector.java:108)
        at org.gradle.internal.component.model.AttributeConfigurationSelector.selectConfigurationUsingAttributeMatching(AttributeConfigurationSelector.java:51)
        at org.gradle.internal.component.external.model.ConfigurationBoundExternalDependencyMetadata.selectConfigurations(ConfigurationBoundExternalDependencyMetadata.java:98)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.EdgeState.calculateTargetConfigurations(EdgeState.java:253)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.EdgeState.attachToTargetConfigurations(EdgeState.java:153)
        at ...org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)

使用 mvnrepository.com 时,请记下该模块在哪个存储库中可用,因为您只为您的构建配置了 JCenter(这通常没问题,但在本例中并非如此)。这里的依赖关系是在汇合 https://packages.confluent.io/maven/存储库:

因此,您需要将此存储库添加到您的构建中:

repositories {
    mavenLocal()
    jcenter()
    maven { url "https://packages.confluent.io/maven/" }
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

找不到 io.confluence:kafka-protobuf-serializer:6.0.0 的相关文章

随机推荐

  • Backbone-relational 无法实例化两个 RelationalModel 对象

    我正在尝试实现 BackboneRelational 并不断获得 无法实例化多个 Backbone RelationalModel 每种类型都有相同的 ID class App Models User extends Backbone Re
  • WordPress .htaccess www。不强迫

    我正在尝试强迫www 在我网站的所有页面上 我将 WordPress 安装在我的主站点 blog 上的一个文件夹中 在 blog 文件夹中有一个 htaccess 文件 其中包含以下内容
  • 管理文件字段当前 url 不正确

    在 Django 管理中 只要有 FileField 编辑页面上就会有一个 当前 框 其中包含指向当前文件的超链接 但是 此链接会附加到当前页面 url 因此会导致 404 因为不存在这样的页面 例如 http 127 0 0 1 8000
  • 当创建 Android Jetpack Compose AndroidView 的参数发生变化时,如何替换它?

    我有一个应用程序 显示封装在其中的几个不同视图AndroidView 在下面重现的简单示例中 这些只是TextView实例 问题是更改文本 在本例中循环显示三个不同的值 似乎不会更新应用程序显示的内容 sealed class AppVie
  • Java 中意外的负数

    import java util public class Prac9FibonacciNumbers public static void main String args int x new int 100 x 0 1 x 1 1 fo
  • 如何在 PHP 中递归删除目录及其全部内容(文件+子目录)? [复制]

    这个问题在这里已经有答案了 如何在 PHP 中删除目录及其全部内容 文件和子目录 手册页中的用户贡献部分rmdir http www php net rmdir包含一个不错的实现 function rrmdir dir if is dir
  • 内联 svg 不显示在 xhtml 中

    我创建了一个带有内联 SVG 的 XHTML 文件 当测试为 XHTML 时 它不会显示 但当测试为 HTML 时 它会显示 我已经搜索过互联网并相信我已经指定了正确的名称空间等 但是 我很困惑为什么它没有显示 请帮助我理解我做错了什么 注
  • 如何使用 UUID 生成唯一的正 Long

    我需要为我的数据库主键列生成唯一的长 ID 我以为我可以用UUID randomUUID getMostSignificantBits 但有时它也会产生一些负多头 这对我来说是个问题 是否可以从 UUID 中仅生成正长 将会有数十亿个条目
  • Apscheduler 运行一次然后抛出 TypeError

    我正在尝试每小时将某人的 soundcloud 关注者列表添加到数据库中 我有代码可以提取他们的关注者列表并将它们添加到数据库中 但是当我将它与 apscheduler 一起使用时 我遇到了错误 这是错误的示例 Traceback most
  • 如何获取调用函数的“this”值?

    如果我有一个这样的函数 function foo this console log this function bar bar prototype func function foo this var test new bar test f
  • 我可以仅在少数情况下关闭模拟吗

    我有一个始终使用模拟的应用程序 但是 当用户以管理员身份登录时 一些操作需要他们写入服务器本身 现在 如果这些用户在实际服务器上没有权限 有些用户没有 则不会让他们写入 我想做的是关闭几个命令的模拟 有没有办法做这样的事情 using Ho
  • 如何最好地实现多个重叠元素的翻转和推出事件?

    Problem 我正在开发一个网站 其中有一个 拨号盘 显示代表伞式公司不同部门的多个选项卡 目前我已经用 HTML CSS 准备好了一切 每个选项卡的定位 内圈处于较高位置z index因为选项卡在滚动时需要向外动画 我可以实现这部分 选
  • 如何从数据框的单元格中获取值?

    我构建了一个条件 从我的数据框中提取一行 d2 df df l ext l ext df item item df wn wn df wd 1 现在我想从特定列中获取一个值 val d2 col name 但结果 我得到一个包含一行和一列
  • 使用JS将图像的特定背景颜色设置为透明

    我正在使用以下代码来修改图像的透明度 然而 我想做的只是修改图像的背景颜色并将其 alpha 通道设置为 0 而不是整个图像 以下代码将整个图像的 Alpha 透明度设置为 0 var ctx this data getContext 2d
  • 加载 ini 文件时发生致命异常

    我的项目文件夹是 demo 其中有文件夹 application library 和 public 在应用程序文件夹中 我有一个名为 configs 的文件夹 其中有一个文件 application ini 其中包含我的数据库参数 因此 在
  • C# datagridview 列转入数组

    我正在用 C 构建一个程序 并在其中包含一个 datagridview 组件 datagridview 有固定数量的列 2 我想将其保存到两个单独的数组中 但行数确实发生了变化 我怎么能这样做呢 假设一个名为 dataGridView1 的
  • 具有适当后退按钮支持的 jQuery Lightbox

    在进行了一些可用性测试后 我发现参与者打开了jQuery 灯箱 http leandrovieira com projects jquery lightbox 查看更大的图像 然后 他们只需点击浏览器后退按钮 而不是单击 关闭 按钮 这会将
  • Symfony 4.1 组件 - 依赖注入问题

    我正在用 PHP 重构旧应用程序 我正在尝试使用 Symfony 依赖注入组件将服务注入控制器 或其他服务 但我不知道如何实现这一点 因为 symphony 文档比框架组件更适合使用框架 我已经有了自己的内核 包含所有服务和控制器的容器 控
  • HTML5 拖放 - 没有透明度?

    当我将一个元素拖放到页面上时 该元素会变成 幻影 基本上它获得了一些透明度值 有什么办法可以做到吗opacity 1 看来是做不到了 拖动的元素被放入具有自己的不透明度 低于 1 的容器中 这意味着虽然您可以降低拖动元素的不透明度 但您无法
  • 找不到 io.confluence:kafka-protobuf-serializer:6.0.0

    直接的问题是 为什么 Gradle 没有解决我添加的这个依赖关系 dependencies kafka protobuf serializer implementation io confluent kafka protobuf seria