You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by "Peter Wicks (pwicks)" <pw...@micron.com> on 2017/10/16 03:17:39 UTC
RE: [EXT] Re: Please refresh my memory on NAR dependencies
Matt,
I am trying to re-use most of CSVUtils, including most of the property descriptors and CSVUtils.createCSVFormat.
It seemed like a waste to duplicate the entire class. I can try making it the parent, what are the implications if I do that?
Thanks,
Peter
-----Original Message-----
From: Matt Burgess [mailto:mattyb149@apache.org]
Sent: Monday, October 16, 2017 10:58 AM
To: dev@nifi.apache.org
Subject: [EXT] Re: Please refresh my memory on NAR dependencies
Do you have a hard requirement on the implementations in nifi-record-serialization-services? Otherwise, the existing examples have the processor POM pointing at the following:
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-record-serialization-service-api</artifactId>
</dependency>
which is the API JAR I think. If you need the implementations behind it, you will probably need to declare that as a parent (not a
dependency) and perhaps still use the API JAR (though I'm guessing about the latter).
Regards,
Matt
On Sun, Oct 15, 2017 at 10:27 PM, Peter Wicks (pwicks) <pw...@micron.com> wrote:
> For NIFI-4465 I want the nifi-poi-bundle to include a Maven dependency on nifi-record-serialization-services. So I start by adding the dependency to the pom.xml.
>
> <dependency>
> <groupId>org.apache.nifi</groupId>
> <artifactId>nifi-record-serialization-services</artifactId>
> </dependency>
>
> I've tried several variations on this, with version numbers, putting it at higher pom levels, including it in the nifi-nar-bundles pom and marking it as included, etc...
>
> Throughout all this compiling is no problem, and all my unit tests run correctly. But when I try to start NiFi I immediately get Class not found exceptions from the nifi-poi classes related to the nifi-record-serialization libraries.
>
> I feel like I've run into this in the past, and it was due to how NAR's work. Can't remember though.
>
> Help would be appreciated!
>
> Thanks,
> Peter
RE: [EXT] Re: Please refresh my memory on NAR dependencies
Posted by "Peter Wicks (pwicks)" <pw...@micron.com>.
I gave this a shot and it worked well for me.
https://github.com/apache/nifi/pull/2194
-----Original Message-----
From: Koji Kawamura [mailto:ijokarumawak@gmail.com]
Sent: Monday, October 16, 2017 12:03 PM
To: dev <de...@nifi.apache.org>
Subject: Re: [EXT] Re: Please refresh my memory on NAR dependencies
Peter, Matt,
If the goal is sharing org.apache.nifi.csv.CSVUtils among modules, an alternative approach is moving CSVUtils to nifi-standard-record-util and add ordinary JAR dependency from nifi-poi-processors. How do you think?
Thanks,
Koji
On Mon, Oct 16, 2017 at 12:17 PM, Peter Wicks (pwicks) <pw...@micron.com> wrote:
> Matt,
>
> I am trying to re-use most of CSVUtils, including most of the property descriptors and CSVUtils.createCSVFormat.
>
> It seemed like a waste to duplicate the entire class. I can try making it the parent, what are the implications if I do that?
>
> Thanks,
> Peter
>
> -----Original Message-----
> From: Matt Burgess [mailto:mattyb149@apache.org]
> Sent: Monday, October 16, 2017 10:58 AM
> To: dev@nifi.apache.org
> Subject: [EXT] Re: Please refresh my memory on NAR dependencies
>
> Do you have a hard requirement on the implementations in nifi-record-serialization-services? Otherwise, the existing examples have the processor POM pointing at the following:
>
> <dependency>
> <groupId>org.apache.nifi</groupId>
> <artifactId>nifi-record-serialization-service-api</artifactId>
> </dependency>
>
> which is the API JAR I think. If you need the implementations behind
> it, you will probably need to declare that as a parent (not a
> dependency) and perhaps still use the API JAR (though I'm guessing about the latter).
>
> Regards,
> Matt
>
>
> On Sun, Oct 15, 2017 at 10:27 PM, Peter Wicks (pwicks) <pw...@micron.com> wrote:
>> For NIFI-4465 I want the nifi-poi-bundle to include a Maven dependency on nifi-record-serialization-services. So I start by adding the dependency to the pom.xml.
>>
>> <dependency>
>> <groupId>org.apache.nifi</groupId>
>> <artifactId>nifi-record-serialization-services</artifactId>
>> </dependency>
>>
>> I've tried several variations on this, with version numbers, putting it at higher pom levels, including it in the nifi-nar-bundles pom and marking it as included, etc...
>>
>> Throughout all this compiling is no problem, and all my unit tests run correctly. But when I try to start NiFi I immediately get Class not found exceptions from the nifi-poi classes related to the nifi-record-serialization libraries.
>>
>> I feel like I've run into this in the past, and it was due to how NAR's work. Can't remember though.
>>
>> Help would be appreciated!
>>
>> Thanks,
>> Peter
Re: [EXT] Re: Please refresh my memory on NAR dependencies
Posted by Koji Kawamura <ij...@gmail.com>.
Peter, Matt,
If the goal is sharing org.apache.nifi.csv.CSVUtils among modules, an
alternative approach is moving CSVUtils to nifi-standard-record-util
and add ordinary JAR dependency from nifi-poi-processors. How do you
think?
Thanks,
Koji
On Mon, Oct 16, 2017 at 12:17 PM, Peter Wicks (pwicks)
<pw...@micron.com> wrote:
> Matt,
>
> I am trying to re-use most of CSVUtils, including most of the property descriptors and CSVUtils.createCSVFormat.
>
> It seemed like a waste to duplicate the entire class. I can try making it the parent, what are the implications if I do that?
>
> Thanks,
> Peter
>
> -----Original Message-----
> From: Matt Burgess [mailto:mattyb149@apache.org]
> Sent: Monday, October 16, 2017 10:58 AM
> To: dev@nifi.apache.org
> Subject: [EXT] Re: Please refresh my memory on NAR dependencies
>
> Do you have a hard requirement on the implementations in nifi-record-serialization-services? Otherwise, the existing examples have the processor POM pointing at the following:
>
> <dependency>
> <groupId>org.apache.nifi</groupId>
> <artifactId>nifi-record-serialization-service-api</artifactId>
> </dependency>
>
> which is the API JAR I think. If you need the implementations behind it, you will probably need to declare that as a parent (not a
> dependency) and perhaps still use the API JAR (though I'm guessing about the latter).
>
> Regards,
> Matt
>
>
> On Sun, Oct 15, 2017 at 10:27 PM, Peter Wicks (pwicks) <pw...@micron.com> wrote:
>> For NIFI-4465 I want the nifi-poi-bundle to include a Maven dependency on nifi-record-serialization-services. So I start by adding the dependency to the pom.xml.
>>
>> <dependency>
>> <groupId>org.apache.nifi</groupId>
>> <artifactId>nifi-record-serialization-services</artifactId>
>> </dependency>
>>
>> I've tried several variations on this, with version numbers, putting it at higher pom levels, including it in the nifi-nar-bundles pom and marking it as included, etc...
>>
>> Throughout all this compiling is no problem, and all my unit tests run correctly. But when I try to start NiFi I immediately get Class not found exceptions from the nifi-poi classes related to the nifi-record-serialization libraries.
>>
>> I feel like I've run into this in the past, and it was due to how NAR's work. Can't remember though.
>>
>> Help would be appreciated!
>>
>> Thanks,
>> Peter