After building an RPM (mvn clean install -Prpm) and installing it (Amazon Linux, Java 1.7.0_91), I ran into the following error attempting to start NiFi :
But the .tar.gz assembly file from the same build works just fine. Comparing listings of the two file sets, it appears that the .tar.gz assembly has complete set of jar files in lib/bootstrap:
while the RPM install's lib/bootstrap has only one of these:
So I tried to troubleshoot why this is. It looks like the nifi-assembly POM is set up to use the same defined set of dependencies for both the maven-assembly-plugin and rpm-maven-plugin plugins. The lib folder plan for both plugins is something like:
lib - all dependencies except nifi-bootstrap
lib/bootstrap - include only nifi-bootstrap
The problem appears to be a difference between how the two plugins handle transitive dependencies. The maven-assembly-plugin has configuration options allowing us to specify that the exclusions apply to the named plugins AND their transitive dependencies. The rpm-maven-plugin does not have a transitive configuration option, and does not appear to do the same thing by default. In fact, the RPM is built with nifi-bootstrap-0.4.1.jar in the lib/bootstrap folder, but all of its transitive dependencies (such as slf4j from the error) are in the lib folder. I believe the RPM installs LICENSE and NOTICE in the docs folder for the same reason.