【发布时间】:2022-01-01 02:01:57
【问题描述】:
尝试在云中部署我们的服务我遇到了两个传递依赖项无法下载的问题:
Welcome to Gradle 6.7.1!
Here are the highlights of this release:
- File system watching is ready for production use
- Declare the version of Java your build requires
- Java 15 support
For more details see https://docs.gradle.org/6.7.1/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not resolve io.confluent:kafka-avro-serializer:5.3.2.
Required by:
project :
project : > org.apache.beam:beam-runners-google-cloud-dataflow-java:2.32.0 > org.apache.beam:beam-sdks-java-io-kafka:2.32.0
> Could not resolve io.confluent:kafka-avro-serializer:5.3.2.
> Could not get resource 'http://packages.confluent.io/maven/io/confluent/kafka-avro-serializer/5.3.2/kafka-avro-serializer-5.3.2.pom'.
> Could not GET 'http://packages.confluent.io/maven/io/confluent/kafka-avro-serializer/5.3.2/kafka-avro-serializer-5.3.2.pom'.
> Connection reset
> Could not resolve io.confluent:kafka-schema-registry-client:5.3.2.
Required by:
project :
project : > org.apache.beam:beam-runners-google-cloud-dataflow-java:2.32.0 > org.apache.beam:beam-sdks-java-io-kafka:2.32.0
> Could not resolve io.confluent:kafka-schema-registry-client:5.3.2.
> Could not get resource 'http://packages.confluent.io/maven/io/confluent/kafka-schema-registry-client/5.3.2/kafka-schema-registry-client-5.3.2.pom'.
> Could not GET 'http://packages.confluent.io/maven/io/confluent/kafka-schema-registry-client/5.3.2/kafka-schema-registry-client-5.3.2.pom'.
> Connection reset
我可以在网络和 stackoverflow 上找到的大多数解决方案都集中在添加一个新的 confluent.io gradle 存储库:
repositories {
mavenCentral()
maven {
url "http://packages.confluent.io/maven/"
}
}
我尝试了 http 和 https。两者都没有改变云中的任何东西。
我尝试将传递依赖项直接添加到项目 gradle。这种方法也没有成功:
implementation group: 'io.confluent', name: 'kafka-avro-serializer', version: '5.3.2'
implementation group: 'io.confluent', name: 'kafka-schema-registry-client', version: '5.3.2'
可能是什么问题?如何最好地解决这个问题?
【问题讨论】:
-
试试其他版本?
-
@OneCricketeer 不同的版本是什么?毕业?依赖项?
-
Avro 序列化程序,因为这就是它所说的找不到。但是,您应该验证此错误中的 url 是否可以由您的机器实际解决。 packages.confluent.io/maven/io/confluent/kafka-avro-serializer/…
标签: java gradle apache-kafka dependencies