Apache nifi NiFi定制处理器引入了标准工件的副本
在1.12中引入多部分POST之前,我已经编写了一个自定义处理器来处理多部分POST。 我使用的处理器和nar运行良好,但nar捆绑包引入了许多标准处理器的副本,版本号与我的定制处理器的版本号匹配 这是在我引入SSLContextService控制器之后开始的。添加控制器服务需要添加Apache nifi NiFi定制处理器引入了标准工件的副本,apache-nifi,Apache Nifi,在1.12中引入多部分POST之前,我已经编写了一个自定义处理器来处理多部分POST。 我使用的处理器和nar运行良好,但nar捆绑包引入了许多标准处理器的副本,版本号与我的定制处理器的版本号匹配 这是在我引入SSLContextService控制器之后开始的。添加控制器服务需要添加 <dependency> <groupId>org.apache.nifi</groupId> <artifactId>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-standard-services-api-nar</artifactId>
<version>1.11.4</version>
<type>nar</type>
</dependency>
根据上的指南,但完成的nar似乎包含标准nifi处理器的2.1.1-SNAPSHOT版本,如AttributesToJson或PutRecord等几十个
排除此依赖项会导致nar生成失败,因为缺少SSLContexService类。
使用提供的作用域构建一个大致相同大小的nar,这会导致NiFi无法启动。到目前为止,我还没有找到一条错误消息来说明原因,它只是在启动时死亡
有人知道如何阻止创建这些副本吗?整个nar pom是
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.jontia</groupId>
<artifactId>PostMultipartFormData</artifactId>
<version>2.1.1-SNAPSHOT</version>
</parent>
<artifactId>nifi-multipart-nar</artifactId>
<version>2.1.1-SNAPSHOT</version>
<packaging>nar</packaging>
<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
<source.skip>true</source.skip>
</properties>
<dependencies>
<dependency>
<groupId>com.jontia</groupId>
<artifactId>nifi-multipart-processors</artifactId>
<version>2.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-standard-services-api-nar</artifactId>
<version>1.11.4</version>
<type>nar</type>
</dependency>
</dependencies>
</project>
处理器Pom
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.jontia</groupId>
<artifactId>PostMultipartFormData</artifactId>
<version>2.1.1-SNAPSHOT</version>
</parent>
<artifactId>nifi-multipart-processors</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-utils</artifactId>
<version>1.11.4</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-ssl-context-service-api</artifactId>
<version>1.11.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-proxy-configuration-api</artifactId>
<version>1.11.4</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.nifi/nifi-processor-utils -->
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-processor-utils</artifactId>
<version>1.11.4</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-standard-processors</artifactId>
<version>1.11.4</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.9</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.11</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.12</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.13.3</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-mock</artifactId>
<version>1.11.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.12</version>
</dependency>
</dependencies>
</project>
processors pom.xml依赖于nifi标准处理器:
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-standard-processors</artifactId>
<version>1.11.4</version>
</dependency>
所以,当你的NAR被构建时,它会拉入标准处理器的JAR中,所以现在它们都被再次捆绑在你的NAR中,也被捆绑在标准NAR中
您不应该依赖于标准处理器。如果其中有您需要的代码,则应将其重构为某种类型的可重用通用模块,或者如果您试图扩展处理器,则应将其复制到NAR中,并进行所需的任何修改。processors pom.xml依赖于nifi标准处理器:
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-standard-processors</artifactId>
<version>1.11.4</version>
</dependency>
所以,当你的NAR被构建时,它会拉入标准处理器的JAR中,所以现在它们都被再次捆绑在你的NAR中,也被捆绑在标准NAR中
您不应该依赖于标准处理器。如果其中有一些代码是您需要的,那么应该将其重构为某种类型的可重用通用模块,或者如果您试图扩展处理器,则应该将其复制到NAR中,并进行所需的任何修改。NAR pom看起来不错,但请显示nifi多部分的pom-processors@BryanBende使用处理器pom更新。NAR pom看起来不错,但请显示nifi多部分的pom-processors@BryanBende更新了处理器pom。谢谢,我一直在关注nar pom。谢谢,我一直在关注nar pom。