I'm new to NiFi and I'm trying to develop my first custom processor.
I'm following documentation(s)/tutorial(s) on how to create one, and here I am:
generated maven skeleton project for nifi-processor; (✔)
added some simple implementation in the onTrigger(...)
method; (✔)
failing to build .nar
. (x)
Whenever I'm executing mvn clean package
either within any sub-directory of the custom processor project structure (nifi-artifactBaseName-nar
or nifi-artifactBaseName-processors
) or in the root directory of the project, I get this:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.2.1:enforce (enforce-maven-version) on project nifi-myfirstcustomrprocessor-nar:
[ERROR] Rule 3: org.apache.maven.enforcer.rules.dependency.RequireReleaseDeps failed with message:
[ERROR] Dependencies outside of Apache NiFi must not use SNAPSHOT versions
[ERROR] com.giorgi.tutorials:nifi-myfirstcustomrprocessor-nar:nar:1.0-SNAPSHOT
[ERROR] com.giorgi.tutorials:nifi-myfirstcustomrprocessor-processors:jar:1.0-SNAPSHOT <--- is not a release dependency
Anything I'm doing wrong? any help?
Solved.
When creating a custom processor project (or just any maven project), version 1.0-SNAPSHOT
is generated by default (disregarding of whether you create it from command-line, IDE, or etc.), and that's NOT OK for NiFi custom processor - you should NOT use SNAPSHOT
for versioning your custom processor artifact.
I just changed 1.0-SNAPSHOT
to 1.0
and everything worked fine - .nar
has been built.