Building and deploying a custom NAR file

About this task

You can build your own custom NAR files and mount them as a volume in a NiFi Docker container:

Procedure

  1. Initiate a “Maven Build...” on the root bundle project. In the Project Explorer, right-click on the root (commerce-search-custom-bundle) and select Run As > Maven build.... (Note that there are two menu items, Maven build and Maven build... Choose Maven build....) The Edit Configuration window opens.

    Enter the command clean install -U -Denforcer.skip=true into the Goals textbox and click the Run button.

    Note:
    • If you encounter any missing dependencies for dummy-commerce-search-processors, dummy-hcl-cache-core or dummy-cf-base JAR files, see ../../tutorials/tutorial/../../search/refs/rsddependency.html.
    • Once the build is successful, the NAR files can be viewed in the target subdirectory of the commerce-custom-search-processors-nar project.
  2. Copy the NAR file from the commerce-custom-search-processors-nar project to the designated extension directory in the host server. Mount these files as a volume in the NiFi Docker container. Ignore the NAR files generated in projects other than commerce-custom-search-processors-nar.
    Note: Here is an example of a command to create a NiFi docker container with the volume mounted on the extension directory:From Version 9.1.9.0 onwards, you must mount the NAR file that has been added to the /extensions folder instead of mounting the volume folder.
  3. Restart the NiFi docker container to apply the changes.
    Note: Restart the NiFi docker container every time you add, remove or replace customized NAR files.
  4. View the custom processor in Add processor on the Nifi console.