英文:
Confluent jar not recognized by Eclipse
问题
我在我的pom.xml
文件中有如下的依赖配置。我能够下载这两个JAR包,但是Eclipse无法识别kafka-json-schema-serializer
。我尝试过清理、删除、重新导入和更新项目,但都没有成功。
我该如何解决这个问题?
pom.xml
配置:
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-json-serializer</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-json-schema-serializer</artifactId>
<version>6.0.0</version>
</dependency>
当我运行mvn install
时,我也收到以下错误:
[WARNING] The POM for
io.confluent:kafka-schema-registry-client:jar:6.0.0无效,
传递依赖(如果有的话)将不可用,启用调试日志以获取更多详细信息。
英文:
I have the below dependency configuration in my pom.xml
. I am able to download both the JARs, but Eclipse is not recognizing kafka-json-schema-serializer
. I have tried to clean, delete, re-import, and update the project, but to no avail.
How can I solve this problem?
pom.xml
configuration:
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-json-serializer</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-json-schema-serializer</artifactId>
<version>6.0.0</version>
</dependency>
I am also receiving the following error when running mvn install
:
> [WARNING] The POM for
> io.confluent:kafka-schema-registry-client:jar:6.0.0 is invalid,
> transitive dependencies (if any) will not be available, enable debug
> logging for more details
答案1
得分: 3
你需要在你的pom.xml文件的repositories
部分下添加Confluent仓库,以便让Maven识别Confluent的依赖项。以下是代码片段:
<repositories>
<repository>
<id>confluent</id>
<url>https://packages.confluent.io/maven/</url>
</repository>
</repositories>
英文:
You need to add the confluent repository under repositories
section in your pom.xml in order to allow maven recognize the confluent dependencies. Here is the snippet:
<repositories>
<repository>
<id>confluent</id>
<url>https://packages.confluent.io/maven/</url>
</repository>
</repositories>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论