Confluent jar not recognized by Eclipse

huangapple go评论59阅读模式
英文:

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:

&lt;dependency&gt;
    &lt;groupId&gt;io.confluent&lt;/groupId&gt;
    &lt;artifactId&gt;kafka-json-serializer&lt;/artifactId&gt;
    &lt;version&gt;6.0.0&lt;/version&gt;
&lt;/dependency&gt;

&lt;dependency&gt;
    &lt;groupId&gt;io.confluent&lt;/groupId&gt;
    &lt;artifactId&gt;kafka-json-schema-serializer&lt;/artifactId&gt;
    &lt;version&gt;6.0.0&lt;/version&gt;
&lt;/dependency&gt;

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:

&lt;repositories&gt;
  &lt;repository&gt;
    &lt;id&gt;confluent&lt;/id&gt;
    &lt;url&gt;https://packages.confluent.io/maven/&lt;/url&gt;
  &lt;/repository&gt;
&lt;/repositories&gt;

huangapple
  • 本文由 发表于 2020年10月8日 03:50:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/64251350.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定