【问题标题】:Could not find artifact io.confluent:kafka-rest-parent:pom:5.4.0-SNAPSHOT and 'parent.relativePath' points at no local在本地找不到工件 io.confluent:kafka-rest-parent:pom:5.4.0-SNAPSHOT 和“parent.relativePath”点
【发布时间】:2019-05-31 04:27:33
【问题描述】:

我正在使用 maven 3 运行应用程序,但出现以下错误:

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for io.confluent:kafka-rest:[unknown-version]: Could not find artifact io.confluent:kafka-rest-parent:pom:5.4.0-SNAPSHOT and 'parent.relativePath' points at no local POM @ line 7, column 12
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project io.confluent:kafka-rest:[unknown-version] (D:\Self\kafka-rest\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for io.confluent:kafka-rest:[unknown-version]: Could not find artifact io.confluent:kafka-rest-parent:pom:5.4.0-SNAPSHOT and 'parent.relativePath' points at no local POM @ line 7, column 12 -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

这里分享 pom .xml 父元素

http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

   <parent>
        <groupId>io.confluent</groupId>
        <artifactId>kafka-rest-parent</artifactId>
        <version>5.4.0-SNAPSHOT</version>
    </parent>

    <artifactId>kafka-rest</artifactId>
    <packaging>jar</packaging>
    <name>kafka-rest</name>
    <description>
        The Kafka REST Proxy provides a RESTful interface to a Kafka cluster, making it easy to
        produce and consume messages, view the state of the cluster, and perform administrative
        actions without using the native Kafka protocol or clients.
    </description>

【问题讨论】:

  • 你能显示你的 POM.xml 文件的相关部分吗?

标签: maven apache-kafka confluent-platform kafka-rest


【解决方案1】:

为了从 master 分支构建任何 Confluent 项目,您必须构建其父依赖项。您不会在可下载位置找到 SNAPSHOTS

这意味着检查 Kafka 源代码,使用 Gradle 安装其当前快照,然后是 Confluent 公共库,然后是 Confluent Rest utils,然后是 Schema Registry(用于 Avro 转换器),然后然后最后构建 REST 代理。

https://github.com/confluentinc/kafka-rest/wiki/FAQ

如果您只想运行 REST 代理,请下载最新的 Confluent 平台并配置 REST 代理配置文件以指向任何现有的 Kafka 代理

【讨论】:

    【解决方案2】:

    另一种解决方案是构建发布版本。

    你可以通过运行找到版本

    git tag --list
    

    选择一个标签 t(例如 v5.2.2)然后运行

    git checkout <t>
    

    然后运行

    man clean package
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-12-12
      • 2013-01-25
      • 1970-01-01
      • 2018-12-13
      • 1970-01-01
      • 2018-08-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多