Hi,
I'd like to write a new processor (initially one that just emits
events), but I've hit an odd problem and was wondering if anyone else
has seen something similar, or has an idea how it should be fixed.
I started by using the maven processor bundle archetype to build an
initial directory structure and place-holder files:
paul@sparkplug:~/git/Nifi$ mvn archetype:generate
-DarchetypeGroupId=org.apache.nifi
-DarchetypeArtifactId=nifi-processor-bundle-archetype
-DarchetypeVersion=1.5.0 -DnifiVersion=1.5.0
[INFO] Scanning for projects...
[...]
[INFO] Parameter: groupId, Value: org.dcache.nifi
[INFO] Parameter: artifactId, Value: nifi-sse-bundle
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: org.dcache.nifi.processors.sse
[INFO] Parameter: packageInPathFormat, Value:
org/dcache/nifi/processors/sse
[INFO] Parameter: package, Value: org.dcache.nifi.processors.sse
[INFO] Parameter: artifactBaseName, Value: sse
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: groupId, Value: org.dcache.nifi
[INFO] Parameter: artifactId, Value: nifi-sse-bundle
[INFO] Parameter: nifiVersion, Value: 1.5.0
[INFO] Project created from Archetype in dir:
/home/paul/git/Nifi/nifi-sse-bundle
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 20.928 s
[INFO] Finished at: 2018-06-06T15:03:08+01:00
[INFO] Final Memory: 14M/223M
[INFO]
------------------------------------------------------------------------
The resulting maven projects build without any issue:
paul@sparkplug:~/git/Nifi$ cd nifi-sse-bundle/
paul@sparkplug:~/git/Nifi/nifi-sse-bundle$ mvn package
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 3 modules...
[...]
[INFO] Reactor Summary:
[INFO]
[INFO] nifi-sse-bundle ...................................
SUCCESS [ 1.835 s]
[INFO] nifi-sse-processors ...............................
SUCCESS [ 3.600 s]
[INFO] nifi-sse-nar ......................................
SUCCESS [ 0.407 s]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 7.471 s
[INFO] Finished at: 2018-06-06T15:03:38+01:00
[INFO] Final Memory: 30M/538M
[INFO]
------------------------------------------------------------------------
However, when I try to work with these projects in Netbeans (v8.2) I see
a problem. After creating a new project group ("Project and all
Required Projects"), I am presented with the following dialogue pop-up:
Project Problems
One or more project resources could not be found [...]
Clicking on the "Resolve Problems..." button, I see the following
dialogue box:
Project Problems:
Unable to properly load project (in nifi-sse-bundle [unloadable])
Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin
org.apache.nifi:nifi-nar-maven-plugin:1.2.0 or one of
its dependencies could not be resolved: The following
artifacts could not be resolved:
org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.0.0.M2a,
org.eclipse.aether:aether-spi:jar:0.9.0.M2,
org.eclipse.aether:aether-impl:jar:0.9.0.M2,
org.eclipse.aether:aether-api:jar:0.9.0.M2: The
repository system is offline but the
artifact org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.0.0.M2a
is not available in the local repository. @
The "Resolve..." button attempts to fix this by triggering a priming
build (in essence, "mvn -DskipTests=true --fail-at-end package"). This
priming build is successful, but no additional artefacts are downloaded.
Therefore the problem is not resolved and netbeans does not show any
Java files.
The sisu and aether dependencies seem to come from nifi-nar-maven-plugin
v1.2.0's various dependencies on Maven v3.1.
As an experiment, I built nifi-nar-maven-plugin v1.2.1-SNAPSHOT, bumping
the maven dependencies from 3.1.0 to 3.1.1. I also updated
nifi-sse-bundle to use this v1.2.1-SNAPSHOT of nifi-nar-maven-plugin.
This "solved" the problem with netbeans: the projects opened correctly
and netbeans no longer described the projects as "[unloadable]".
However, I still not sure if this is a problem with netbeans or with nifi.
Has anyone else have any experience with this kind of problem?
Cheers,
Paul.