Support Questions

Find answers, ask questions, and share your expertise

Apache Nifi Custom processor with org.json dependency

avatar
New Contributor

Hi, 

I am trying to create a custom apache nifi processor using maven archetype:

GroupId: org.apache.nifi

ArtifactId: nifi-processor-bundle-archetype

Version: 1.18.0

If I add in my processor maven dependency 

<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20220924</version>
<scope>compile</scope>
</dependency>

and then try to run maven install I receive the following error:

[ERROR] Rule 3: org.apache.maven.plugins.enforcer.BannedDependencies failed with message:
Found Banned Dependency: org.json:json:jar:20220924
Use 'mvn dependency:tree' to locate the source of the banned dependencies.

Looking at parent nifi dependencies I am seeing this section in nifi.1.18.0 pom.xml file

<bannedDependencies>
<excludes>
<!-- Cat-X Deps -->
<exclude>org.json:json:*:*:compile</exclude>
...

Why org.json dependency is explicitly banned? If it's expected how a custom processor can use classes and functionalities from org.json package such as JSONObject ?

Thank you in advance,
Roman

 

0 REPLIES 0