Hello,

Regarding bundling the WAR, take a look at the update attribute NAR.
If you look at the expanded NAR after starting NiFi, it is located at
"work/nar/extensions/nifi-update-attribute-nar-1.16.0-SNAPSHOT.nar-unpacked/NAR-INF/bundled-dependencies"
you will see inside there is a ".war", so you will want a similar
setup where you build a WAR for your custom UI and it ends up inside
your packaged NAR.

Regarding the Maven error, we would need to see a stacktrace for the
error. It may already be further up in the Maven output, or you could
run with -X to get much more detailed output.

Thanks,

Bryan

On Wed, Feb 9, 2022 at 8:24 AM Shun Jie Tan
<shunjie....@data4life-asia.care> wrote:
>
> Hi,
>
> I have made some updates to my repository. Apparently I need to include the
> version for my dependencies, now 'mvn clean install' builds successfully
> for nifi-MapperUI-bundle and I copy-paste the nar file into my local niifi
> lib folder. But the advanced button doesn't appear when I create the
> MapperUI processor. What am I missing?
>
> As for nifi-MapperUIver1-bundle, there is a new error when I try to run
> 'mvn clean install'. This is the error it shows.
>
> [*ERROR*] Failed to execute goal
> org.apache.nifi:nifi-nar-maven-plugin:1.3.2:nar *(default-nar)* on project
> nifi-MapperUIver1-nar: *Failed to create Extension Documentation*: Failed
> to create Extension Definition for PROCESSOR
> org.apache.nifi.processors.MapperUIver1.MyProcessor -> *[Help 1]*
>
> I'm trying to figure out what is the cause of this error. Please advise me
> on how to fix this. Thank you.
>
>
> Best regards,
>
> Shun Jie
>
>
>
> On Wed, Feb 9, 2022 at 1:08 PM Shun Jie Tan <shunjie....@data4life-asia.care>
> wrote:
>
> > Hello,
> >
> > I'm trying to create a custom processor with a custom UI that will appear
> > when the advanced button is clicked similar to UpdateAttribute and
> > JoltTransformJSON processors.
> >
> > The first step that I want to achieve is to have the advanced button
> > appear on my custom processor and display some simple text on the iframe
> > when clicked as a prototype. Using NiFi I installed locally to test out the
> > prototype for now.
> >
> > The current difficulty I'm facing is setting up the dynamic web project as
> > I'm not sure what is the right way to do it. Is there a maven archetype to
> > use for creating the custom UI?
> >
> > I have tried 2 ways to create my bundle.
> > First, I generated the nifi-processor-bundle-archetype using command line
> > and I created the dynamic web project separately using Eclipse IDE,
> > adding a pom.xml to it then copy-paste it into the
> > nifi-processor-bundle-archetype project bundle.
> >
> > For the second way, I created the nifi-processor-bundle-archetype project
> > in Eclipse IDE and added the dynamic web project directly into the project
> > bundle then, converting the dynamic web project into a maven project.
> >
> > Both of the projects produce 'jar is missing' error for some dependencies
> > when I run the 'mvn clean install' command. I had done 'maven > update
> > project' for the second project but the error still persists.
> >
> > I have seen the nifi documentation,
> > https://docs.cloudera.com/cfm/2.1.1/nifi-dev-guide/topics/nifi-custom-processor-uis.html,
> > for creating custom UI but I don't quite get the part where it says to
> > bundle the WAR file into a processor NAR.
> >
> > From NiFi's github repository, I see the structure for the
> > nifi-update-attribute-bundle contains the nifi-update-attribute-ui folder
> > so the bundling of the WAR file doesn't make sense to me.
> >
> > I have pushed my progress onto my github repository,
> > https://github.com/shunjie-t/nifi-custom-processor, for your reference.
> > Please guide me on how to set up the custom UI. Thank you.
> >
> > Best regards,
> > Shun Jie
> >

Reply via email to