[ 
https://issues.apache.org/jira/browse/NIFI-6190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16812443#comment-16812443
 ] 

Michael Moser commented on NIFI-6190:
-------------------------------------

Hello [~EdR].

You should be able to use your company's standard parent pom without problem.  
Just be sure that your local pom.xml references the nifi-nar-maven-plugin, as 
described here [NiFi Developers Guide - 
NARs|http://nifi.apache.org/docs/nifi-docs/html/developer-guide.html#nars]. Be 
sure to use the latest version of nifi-nar-maven-plugin.

In order to use controller services in your custom NiFi components, you must 
reference the NAR that contains the interfaces for those services.  You do this 
by adding the below dependency to the pom.xml that builds your custom NAR.  
This example makes available the services that implement the 
DistributedMapCacheClient, which you used in your example.
{noformat}
<dependency>
   <groupId>org.apache.nifi</groupId>
   <artifactId>nifi-standard-services-api-nar</artifactId>
   <version>1.8.0</version>
   <type>nar</type>
 </dependency>{noformat}

> identifiesControllerService does not work when not inheriting from nar-bundles
> ------------------------------------------------------------------------------
>
>                 Key: NIFI-6190
>                 URL: https://issues.apache.org/jira/browse/NIFI-6190
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Ed R
>            Priority: Major
>
> My company requires that we inherit from our standard parent pom, so our 
> custom NiFi processors just bring in the required NiFi components as 
> dependencies. This works fine, except that we cannot integrate with 
> controller services.
> When we have a property that uses identifiesControllerService(), NiFi 
> attempts to find that controller in the custom processor's package and 
> version, and not the package/version of the class passed to that method.
> So if the custom processor is in package "com.company.product" with version 
> 1.0-SNAPSHOT, and it pulls in NiFi 1.8.0 components like 
> DistributedMapCacheClient, the processor builds just fine of course, but when 
> trying to configure an instance of the processor in NiFi's UI, it is unable 
> to find or create any instances of the controller service for that processor 
> because it says it can't find com.company.product.DistributedMapCacheClient 
> 1.0-SNAPSHOT.
> I even tried calling 
> context.getControllerServiceLookup().getControllerServiceIdentifiers(DistributedMapCacheClient.class)
>  and it returns an empty set.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to