The advantage of naming your artifact with a redundant prefix project name
(like 'nifi-*') is that if you ever look at a big pile of jars, you can
somewhat eyeball them and know where they came from. i.e. nifi-utils.jar is
better than utils.jar, in terms of identifying its source.  Likewise, you
help avoid jar naming clashes for generically named jars.

I don't believe this matters for the archetype or the maven plugin.  But it
might be nice for other released artifacts.

On Tue, Jan 20, 2015 at 9:26 AM, Mark Payne <[email protected]> wrote:

> Bryan,
> I would forgo the 'nifi-' prefix personally. We go back & forth a bit on
> this with our artifacts, admittedly. But when you use a Maven archetype
> you'll be specifying the groupId as well as the artifactId, and since the
> groupId would be 'org.apache.nifi' I think in this case the 'nifi-' prefix
> is redundant.
> Thanks-Mark
>
> > Date: Tue, 20 Jan 2015 09:17:23 -0500
> > Subject: Re: Processor Bundle Archetype
> > From: [email protected]
> > To: [email protected]
> > CC: [email protected]
> >
> > Sounds good. Is there any preference on the artifactId?
> >
> > I originally called it nifi-processor-bundle-archetype, but maybe
> > processor-bundle-archetype makes more sense now since it will already be
> > clear that it is part of NiFi.
> >
> > -Bryan.
> >
> > On Tue, Jan 20, 2015 at 8:45 AM, Joe Witt <[email protected]> wrote:
> >
> > > I recommend nifi/maven - archetypes.
> > >
> > > Thanks Bryan!
> > > On Jan 20, 2015 8:44 AM, "Mark Payne" <[email protected]> wrote:
> > >
> > >> All,
> > >> Bryan has done a great job of creating a Maven archetype for creating
> a
> > >> processor bundle (processor + nar + parent). I think it will be
> extremely
> > >> helpful to have, and Bryan has chosen to contribute the archetype
> back to
> > >> the community.
> > >> The question is where in the source tree does it make sense to put it?
> > >> I could see putting it directly under nifi/ or nifi/commons but I
> imagine
> > >> that there will be more archetypes in the future -- for reporting
> tasks,
> > >> for controller services, and perhaps other things.  So maybe we would
> > >> create a nifi/maven-archetypes or a nifi/commons/maven-archetypes
> directory.
> > >> Any thoughts on where best to add this into the source tree?
> > >> Thanks-Mark
> > >>
> > >> Date: Mon, 19 Jan 2015 21:48:26 -0500
> > >> Subject: Re: Processor Bundle Archetype
> > >> From: [email protected]
> > >> To: [email protected]
> > >>
> > >> Hey Mark,
> > >>
> > >> Since it looks like the develop branch is back to having the
> > >> nar-maven-plugin and nifi as the two top level directories, where
> would you
> > >> want to put the archetype? I guess it could be a directory under nifi
> ?
> > >>
> > >> And do you have a preference on the artifactId? In my own repo I
> called
> > >> it nifi-processor-bundle-archetype, but I wasn't sure if something
> else
> > >> made more sense within the actual NiFi source code.
> > >>
> > >> -Bryan
> > >>
> > >> On Fri, Jan 16, 2015 at 9:37 AM, Mark Payne <[email protected]>
> wrote:
> > >>
> > >>
> > >>
> > >> Bryan,
> > >> That's great - I was hoping you'd go ahead and contribute that back. I
> > >> think it's best if you create the patch/pull-request so that all of
> the git
> > >> patch magic can take affect and show you as the contributor. I think
> > >> putting it into that new directory with the nar plugin is the way to
> go,
> > >> too.
> > >> I created a ticket that you can submit the patch/PR to:
> > >> https://issues.apache.org/jira/browse/NIFI-272
> > >> Many thanks!-Mark
> > >>
> > >> Date: Fri, 16 Jan 2015 09:27:09 -0500
> > >> Subject: Re: Processor Bundle Archetype
> > >> From: [email protected]
> > >> To: [email protected]
> > >>
> > >> Hey Mark,
> > >> Glad you like the archetype so much! I would love to contribute it to
> the
> > >> official codebase. I could probably put together a patch/pull-request
> over
> > >> the weekend if that works, or if you are looking to get it in there
> today,
> > >> I have no problem with you taking the reigns and doing it. I was
> looking at
> > >> the latest code last night and I saw one of Joe W's email about the
> latest
> > >> directory structure, so I assume we could put the archetype along
> side the
> > >> nar plugin. Let me know what you want to do.
> > >> -Bryan
> > >> On Fri, Jan 16, 2015 at 8:45 AM, Mark Payne <[email protected]>
> wrote:
> > >>
> > >>
> > >>
> > >> Hey Bryan,
> > >> Sorry, I never did write back. I did look at the documentation that
> you
> > >> put together, and it's perfect. Every time I write Processor, I end up
> > >> copying another index.html and gutting it to look just like this one
> and
> > >> then filling in. So nice to not have to do that every time. I
> appreciate
> > >> all the work you put into this!
> > >> Were you interested in putting this into the Apache NiFi codebase? Or
> did
> > >> you want to keep it separate?
> > >> Thanks-Mark
> > >>
> > >> > Date: Wed, 7 Jan 2015 20:42:10 -0500
> > >> > Subject: Re: Processor Bundle Archetype
> > >> > From: [email protected]
> > >> > To: [email protected]
> > >> >
> > >> > Mark,
> > >> >
> > >> > Thanks for the feedback! and glad it is useful for you.
> > >> >
> > >> > I just made the updates you suggested so you should be able to pull
> them
> > >> > down from GitHub.
> > >> >
> > >> > If you were thinking of anything different for the documentation
> stub
> > >> let
> > >> > me know. I just took an example that had Uses Attributes, Modifies
> > >> > Attributes, Properties, and Relationships, and then removed the
> specific
> > >> > content.
> > >> >
> > >> > -Bryan
> > >> >
> > >> > On Wed, Jan 7, 2015 at 4:34 PM, Mark Payne <[email protected]>
> > >> wrote:
> > >> >
> > >> > > Bryan,
> > >> > > This is great! I've been meaning to do this for a while... just
> > >> haven't
> > >> > > gotten around to it. Very helpful.
> > >> > > It's done pretty well, too, I would say. I have just a few things
> I'd
> > >> > > point out:
> > >> > > In the Processor implementation, I would avoid
> the:this.myProperty =
> > >> > > context.getProperty(MY_PROPERTY).getValue();
> > >> > > and defining the myProperty variable altogether.
> > >> > > This approach is not thread-safe, and the context.getProperty()
> > >> returns
> > >> > > PropertyValue, which has some nice convenience methods like
> > >> "asInteger",
> > >> > > etc.
> > >> > > In the onTrigger method, the argument names are 'processContext'
> and
> > >> > > 'processSession'. I would call these simply 'context' and
> 'session',
> > >> as
> > >> > > it's much easier to type and these are the names that are
> typically
> > >> used.
> > >> > > In the processor's directory you may also want to build a
> directory
> > >> > > structure
> > >> > >
> > >>
> of:src/main/resources/docs/org.apache.nifi.processors.MyProcessor/index.html
> > >> > > with a stubbed out documentation. The Standard Processors all use
> the
> > >> same
> > >> > > documentation.
> > >> > > Then, in the application, if you right-click on a Processor and
> click
> > >> > > "Usage", that's where the information comes from.
> > >> > > This is very helpful! I will be building this locally so I can
> start
> > >> > > making use of it.
> > >> > >
> > >> > > > Date: Sun, 4 Jan 2015 15:23:56 -0500
> > >> > > > Subject: Processor Bundle Archetype
> > >> > > > From: [email protected]
> > >> > > > To: [email protected]
> > >> > > >
> > >> > > > After setting up a project to develop some custom processors, I
> > >> started
> > >> > > > thinking it would be useful to have a really easy way to jump
> start
> > >> a new
> > >> > > > project, so I created a Maven archetype that can be used to
> help get
> > >> > > > started:
> > >> > > >
> > >> > > > https://github.com/bbende/nifi-processor-bundle-archetype
> > >> > > >
> > >> > > > If anyone has any feedback on useful defaults, or best
> practices to
> > >> > > > include, let me know.
> > >> > > >
> > >> > > > If something like this already exists, then I'll chalk this up
> to a
> > >> good
> > >> > > > learning experience since I learned a lot about multi-module
> > >> archetypes
> > >> > > :)
> > >> > > >
> > >> > > > -Bryan
> > >> > >
> > >> > >
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >
>
>

Reply via email to