Troubleshooting: Missing custom NiFi processor dependencies
When creating a custom NiFi processor by extending the default Ingest processor in the NiFi Toolkit, one or more dependency errors can occur.
Problem
When creating a custom NiFi processor by extending the default Ingest processor in
the NiFi Toolkit, dependency errors can occur, similar to the
following:
[ERROR] Could not resolve local dependency com.hcl.commerce:dummy-commerce-search-processors:jar:9.1.13.2:system
[ERROR] Could not resolve local dependency com.hcl.commerce:dummy-hcl-cache-core:jar:9.1.13.0:system
[ERROR] Could not resolve local dependency com.ibm.commerce.cf:dummy-cf-base:jar:9.1.13.0:systemSolution
- For each missing
dummy-commerce-search-processors,dummy-hcl-cache-core, ordummy-cf-baseJAR file, run the following command:mvn install:install-file "-Dfile=<jarFileLocation>" \ "-DgroupId=<groupId>" \ "-DartifactId=<artifactId>" \ "-Dversion=<version>" \ "-Dpackaging=jar" \ "-DgeneratePom=true"For example:mvn install:install-file "-Dfile=C:\jars\cf-base-9.1.13.0-20230527.170041-38.jar" "-DgroupId=com.ibm.commerce.cf" "-DartifactId=dummy-cf-base" "-Dversion=9.1.13.0" "-Dpackaging=jar" "-DgeneratePom=true" - Edit the pom.xml configuration file under the
commerce-custom-search-processor directory.Make the following changes for each missing
dummy-commerce-search-processors,dummy-hcl-cache-coreanddummy-cf-basedependency:- Remove the
systemPathproperty from the dependency declaration. - Change the scope of each dependency from
systemtocompile.
To:<dependency> <groupId>com.ibm.commerce.cf</groupId> <artifactId>dummy-cf-base</artifactId> <version>9.1.13.0</version> <scope>system</scope> <systemPath>${project.basedir}/libs/cf-base.jar</systemPath> </dependency><dependency> <groupId>com.ibm.commerce.cf</groupId> <artifactId>dummy-cf-base</artifactId> <version>9.1.13.0</version> <scope>compile</scope> </dependency>Save and close the file.
- Remove the
Note: If you encounter issues with any of
the artifacts in the Maven repository, you can try a higher or lower version of
the same artifact to resolve the issue.Result
The dependency errors are corrected.