I've implemented a groovy ScriptedReader , and wish to reuse jar libraries 
which are already part of NiFi from my script.

https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-scripting-nar/1.5.0/org.apache.nifi.record.script.ScriptedReader/index.html

The script can be seen at 
https://gist.github.com/pipern/2d67fbc0a4225cf1b42d1fff832c2c54 

My script needs some of the 'jar files' which are present in nifi-standard-nar. 
Is there a way I can reuse those already inside that nar file? Otherwise I'll 
have to unpack the nar, place the jar files in some other folder, and refer to 
that folder in 'Module Directory' - on every machine in the NiFi cluster. I'm 
looking for maybe some way to have my goovy script use a different classloader 
(?) or somehow reuse the existing jar files inside that nar file. Maybe it 
would be reliable to predict the 'work' folder and look for unpacked nar files 
in there...

Many thanks,

 Nick

Reply via email to