This is the first time I am using maven, I want to implement a processor for apache-nifi. Now for this I am using a proprietary jar file which is an SDK. It is not on the repositories. Therefore i have put it in the pom.xml
as follows.
<dependency>
<groupId>KS</groupId>
<artifactId>En-SDK</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/En-SDK-Java.jar</systemPath>
</dependency>
I am using intelliJ
which seem to have no problem importing this dependency. So is the maven build procedure.
I use mvn clean install
as explained in this tutorial. Which gives me with a nar
package as the output. (no build errors)
This nar
, which is supposed to be put in the $NIFI_HOME/lib
directory does not bundle the said local jar.
If i place this nar file in the required directory and start apache-nifi
,
INFO [main] org.apache.nifi.nar.NarClassLoaders Loaded NAR file: /..././work/nar/extensions/myNar.nar
Seems to be loaded by the NarClassLoaders
, but following that I get an exception and nifi
doesn't start.
java.lang.NoClassDefFoundError: com/kls/../../SubscriptionInterface
The SubscriptionInterface
is a class from the said local jar.
If I look at the nar
file's folder structure, inside the META-INF/bundled-dependencies/
i see every other dependant jar files defined in the pom but not this local jar i used.
How to overcome this?