Nicholas,

I finally had a few cycles to iron out some bugs in the Gradle NAR
example [1], feel free to check it out as it should be in much better
shape. Once it's ready for primetime, I'd like to add it to Lazybones
[2] and/or find a home for it in nifi-maven [3] (or a new similar repo
nifi-gradle ;)

I'm going to try to apply this to an existing NAR in the NiFi codebase
that does real work with third-party dependencies and parent NARs.
Eventually I'd like to see it building equivalently and way faster
than Maven :)

Regards,
Matt

[1] https://github.com/mattyb149/nifi-gradle-nar-example
[2] https://github.com/pledbrook/lazybones
[3] https://github.com/apache/nifi-maven

On Tue, Jan 9, 2018 at 12:06 PM, Matt Burgess <mattyb...@apache.org> wrote:
> Nicholas,
>
> You shouldn't need to reference StandardSSLContextService explicitly,
> as your processor should be using the interface SSLContextService
> only.  In the Maven world, this is done by bringing in
> nifi-ssl-context-service-api as a "provided" dependency (not compile),
> and adding a dependency on your NAR module to the
> nifi-standard-services-api-nar NAR. This is handled by a custom
> NarMojo for doing NiFi ARchive (NAR) packaging [1].
>
> In the Gradle world we'll need a task to do the same thing, I believe
> it is mostly a matter of getting the separate subprojects set up to
> mimic the Maven modules, and a task (whether published as a plugin
> like the NarMojo plugin is for Maven or not) to update the NAR
> manifest and such.  I have begun work on this [2], please feel free to
> take a look and let me know what you think. At present I believe I am
> missing a directive to copy all the processors' subproject
> dependencies into the NAR output artifact, I think I know how to fix
> it (i.e. from project(':processors').tasks['jar'].archivePath) but
> haven't had time to try it out.
>
> Please let me know if you'd like to work on the Gradle stuff together,
> I would be happy to collaborate :)
>
> Regards,
> Matt
>
> [1] https://github.com/apache/nifi-maven
> [2] https://github.com/mattyb149/nifi-gradle-nar-example
>
> On Tue, Jan 9, 2018 at 11:47 AM, Nicholas Deane <nde...@vitalimages.com> 
> wrote:
>> Hi,
>>
>> I’m working on a custom processor and want to utilize NiFi’s 
>> SSLContextService.
>>
>> In my build.gradle dependencies section, I’ve included:
>>   compile "org.apache.nifi:nifi-ssl-context-service-api:$nifiVersion"
>>
>> and in my code I’ve created the property descriptor with 
>> .identifiesControllerService(SSLContextService.class)
>>
>> When I’m configuring the processor, I noticed that the property on the 
>> processor says that it “Requires Controller Service: SSLContextService from 
>> my-custom-nar”. When I create a StandardSSLContextService from the default 
>> org.apache.nifi bundle, it doesn’t show up in the processor’s list (as 
>> expected based on that info message).
>>
>> I tried bringing in “nifi-ssl-context-service” and now I have two versions 
>> of StandardSSLContextService in the controller service list (one from the 
>> org.apache.nifi bundle and the other from my-custom-nar bundle). Is this how 
>> I should be doing something like this or is there a better way for me to use 
>> Controller Services across bundles and avoid having duplicates in that list?
>>
>>
>> Notice - Confidential Information The information in this communication and 
>> any attachments is strictly confidential and intended only for the use of 
>> the individual(s) or entity(ies) named above. If you are not the intended 
>> recipient, any dissemination, distribution, copying or other use of the 
>> information contained in this communication and/or any attachment is 
>> strictly prohibited. If you have received this communication in error, 
>> please first notify the sender immediately and then delete this 
>> communication from all data storage devices and destroy all hard copies.

Reply via email to