【问题标题】:Can't create KSQL UDF jar无法创建 KSQL UDF jar
【发布时间】:2019-06-26 22:37:38
【问题描述】:

我为KSQL实现了一个UDF(User-Defined-Function),并根据https://docs.confluent.io/current/ksql/docs/developer-guide/udf.html配置了Maven pom.xml文件

当我尝试使用 mvn clean package 创建 jar 文件时,遇到以下错误:

[ERROR] Failed to execute goal on project CustomUDF: Could not resolve dependencies for project XXXX:CustomUDF:jar:1.0-SNAPSHOT: Failure to find kafka-avro-confluent:kafka-avro-confluent:jar:0.1.0 in http://packages.confluent.io/maven/ was cached in the local repository, resolution will not be reattempted until the update interval of confluent has elapsed or updates are forced -> [Help 1]

我在架构注册表 GitHub 常见问题解答中发现了一个相关问题: https://github.com/confluentinc/schema-registry/wiki/FAQ#when-i-try-to-compile-i-get-an-error-about-a-missing-snapshot-dependency

这是解决我的错误的正确方法吗?我尝试按照说明构建依赖项,但 ./gradlew installAll 只会导致更多错误(如果这是修复我的错误的正确方法,我可以分享)。

什么是“或者,使用发布标签(例如 v3.2.0)作为新开发分支的基础。”详细的意思?这会是一个合适的选择吗?

【问题讨论】:

    标签: apache-kafka confluent-platform ksqldb


    【解决方案1】:

    更新:我能够通过直接使用 IntelliJ 而不是 shell 命令创建 jar 文件:

    我打开 Maven 窗口并选择 My Project name -> Lifecycle -> install -> Run Maven Build,它在我的 IntelliJ 项目文件夹的目标子文件夹中创建了 jar。

    之后我按照正常的 KSQL UDF 部署步骤 (https://docs.confluent.io/current/ksql/docs/developer-guide/udf.html#deploying) 一切正常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-22
      • 2021-10-27
      • 1970-01-01
      • 2018-10-15
      • 1970-01-01
      相关资源
      最近更新 更多