创建自定义处理器 apache nifi 时出错 [英] Error during the creating of custom processors apache nifi

查看:33
本文介绍了创建自定义处理器 apache nifi 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用 mvn clean package 命令使用 NiFi 自定义处理器构建我的包,我得到以下输出:

I tried to build my package with NiFi custom-processor using mvn clean package command and I got the following output:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.794 s
[INFO] Finished at: 2021-05-17T14:33:42+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile 
(groovy-tests) on project mycustom-processor: Execution groovy-tests of goal
 org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile failed: 
Plugin org.apache.maven.plugins:maven-compiler-plugin:3.8.1 or one of its dependencies
 could not be resolved: Failed to collect dependencies at 
org.apache.maven.plugins:maven-compiler-plugin:jar:3.8.1 
-> org.codehaus.groovy:groovy-eclipse-batch:jar:2.5.4-01: Failed to read artifact descriptor for 
org.codehaus.groovy:groovy-eclipse-batch:jar:2.5.4-01: Could not transfer artifact
 org.codehaus.groovy:groovy-eclipse-batch:pom:2.5.4-01 from/to bintray 
(https://dl.bintray.com/groovy/maven): 
Access denied to: https://dl.bintray.com/groovy/maven/org/codehaus/groovy/groovy-eclipse-batch/2.5.4-01/groovy-eclipse-batch-2.5.4-01.pom, 
ReasonPhrase: Forbidden. -> [Help 1]
[ERROR] 

有人知道如何处理与 maven-compiler-plugin:3.8.1:testCompile 相关的问题吗?我使用 Apache NiFi 版本 1.13.2 并且 mvn install -DskipTests 没有改变任何东西.

Does anybody know how to handle this issue related to the maven-compiler-plugin:3.8.1:testCompile, please ? I use Apache NiFi version 1.13.2 and mvn install -DskipTests does not change anything.

推荐答案

出现这个错误的原因是 pom 的 url 无法访问.

The reason for this error is that the pom's url is not accessable.

目前,groovy-eclipse-batch-2.5.4-01.pom 链接被禁止.(dl.bintray.com/groovy/maven/org/codehaus/groovy/groovy-eclipse-batch/2.5.4-01/groovy-eclipse-batch-2.5.4-01.pom)

Currently, groovy-eclipse-batch-2.5.4-01.pom link is forbidden.(dl.bintray.com/groovy/maven/org/codehaus/groovy/groovy-eclipse-batch/2.5.4-01/groovy-eclipse-batch-2.5.4-01.pom)

检查 groovy-eclipse-batch 是否存在于您的 Maven 存储库中.或者只是在 mvnrepository.com 上找到一个有效的版本并使用它.(https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-eclipse-batch)

Check if groovy-eclipse-batch exists in your maven repository. Or just find a valid version on mvnrepository.com and use it. (https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-eclipse-batch)

例如,将 groovy-eclipse-batch 的版本更改为 2.5.6-01.

For example, change version of groovy-eclipse-batch to 2.5.6-01.

尝试将以下内容添加到捆绑项目的父 pom 中:

Try adding the following to your parent pom for the bundle project :

<build>
    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>            
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <encoding>UTF-8</encoding>
            </configuration>                        
            <dependencies>
                <dependency>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy-eclipse-batch</artifactId>
                    <version>2.5.6-01</version>
                </dependency>
            </dependencies>                 
        </plugin>
    </plugins>
</build>

在添加依赖之前:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (groovy-tests) on project mytest: Execution groovy-tests of goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile failed: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.8.1 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-compiler-plugin:jar:3.8.1 -> org.codehaus.groovy:groovy-eclipse-batch:jar:2.5.4-01: Failed to read artifact descriptor for org.codehaus.groovy:groovy-eclipse-batch:jar:2.5.4-01: Could not transfer artifact org.codehaus.groovy:groovy-eclipse-batch:pom:2.5.4-01 from/to bintray (https://dl.bintray.com/groovy/maven): Access denied to: https://dl.bintray.com/groovy/maven/org/codehaus/groovy/groovy-eclipse-batch/2.5.4-01/groovy-eclipse-batch-2.5.4-01.pom -> [Help 1]

添加依赖后:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for mytest 1.0.0-SNAPSHOT:
[INFO]
[INFO] mytest ............................................. SUCCESS [  3.611 s]
[INFO] nifi-mytestnar-processors .......................... SUCCESS [ 11.278 s]
[INFO] nifi-mytestnar-nar ................................. SUCCESS [  0.983 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  19.448 s

这篇关于创建自定义处理器 apache nifi 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆