我正在尝试在 Spring Boot 应用程序中添加 Kafka Avro 序列化和 Schema Registry Client 的 Confluent 依赖项。但是,当我尝试使用 Maven 构建项目时,出现以下错误:
在中心( https://repo.maven.apache.org/maven2)中找不到工件 io.confluent:kafka-schema-registry-client:pom:7.8.0
<!-- https://mvnrepository.com/artifact/io.confluent/kafka-avro-serializer -->
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-avro-serializer</artifactId>
<version>7.8.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.confluent/kafka-schema-registry-client -->
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-client</artifactId>
<version>7.8.0</version>
</dependency>
要删除
io/confluent
Maven 本地存储库缓存中的文件夹并重建项目,请按照以下步骤操作:1. 找到 Maven 本地存储库
Maven本地仓库的默认路径是:
C:\Users\<YourUsername>\.m2\repository
~/.m2/repository
2.删除
io/confluent
文件夹导航到
io/confluent
Maven 存储库内的文件夹并将其删除。3.在 IntelliJ IDEA 中重建项目
mvn clean install
如有必要,运行 Maven 构建命令 ( )。这将强制 Maven 重新下载
io/confluent
依赖项并重建项目。