You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Roy Huang <ro...@gmail.com> on 2021/12/22 02:48:12 UTC
How to run nifi in a development environment
Hi everyone
I want to modify some css style in nifi, but I don't know how to run it in
a dev environment, can you help me with that? I'm a front-end developer and
don't know about java maven.
Re: How to run nifi in a development environment
Posted by Shane Ardell <sh...@gmail.com>.
Hi Roy,
I have a bash script that may be of use to you. It rebuilds the UI and
copies it over to the target lib directory. It'll pick up .jsp changes as
well as JS and CSS. You can find it here:
https://gist.github.com/sardell/65d7c225a5c70056e3e7a54ec4027fdb
Best,
Shane
On Wed, Dec 22, 2021 at 10:42 AM Mark Payne <ma...@hotmail.com> wrote:
> My apologies, apparently the syntax that Matt provided is also valid. Just
> an alternate syntax that I wasn’t aware of.
>
> Thanks
> -Mark
>
> Sent from my iPhone
>
> > On Dec 22, 2021, at 10:17 AM, Mark Payne <ma...@hotmail.com> wrote:
> >
> > Just a slight clarification on the syntax. I think the maven command
> is:
> >
> > mvn clean install -P!minify-and-compress
> >
> > But you may need to escape the ! So you may need to run
> >
> > mvn clean install -P\!minify-and-compress
> >
> > Thanks
> > -Mark
> >
> > Sent from my iPhone
> >
> >> On Dec 22, 2021, at 10:03 AM, Matt Gilman <ma...@gmail.com>
> wrote:
> >>
> >> Hi Roy,
> >>
> >> By default, the maven build will minify and aggregate all the front-end
> >> resources. There is a profile that you can (de)activate to instead
> bundle
> >> the resources as they are in the source. This should look something
> like:
> >>
> >> mvn clean install -P-minify-and-compress
> >>
> >> When running the resulting build you should be able to inspect things
> with
> >> DevTools and set breakpoints in the debugger. Subsequent iterations can
> be
> >> made faster by only building the necessary modules needed to bundle a
> new
> >> front-end. Specifically, that is nifi-web-ui (don't forget to deactivate
> >> minify-and-compress) and nifi-server-nar. The resulting NAR from the
> target
> >> directory in nifi-server-nar will need to be copied to the lib
> directory of
> >> your previously built assembly.
> >>
> >> Unfortunately, there is no way to run just the front-end in a dev server
> >> decoupled from the backed. The NiFi front-end sources are in JSPs which
> >> generate markup server side.
> >>
> >> Hope this helps.
> >>
> >> Matt
> >>
> >>>> On Tue, Dec 21, 2021 at 10:24 PM Roy Huang <ro...@gmail.com>
> wrote:
> >>>
> >>> Hi everyone
> >>>
> >>> I want to modify some css style in nifi, but I don't know how to run
> it in
> >>> a dev environment, can you help me with that? I'm a front-end
> developer and
> >>> don't know about java maven.
> >>>
>
Re: How to run nifi in a development environment
Posted by Mark Payne <ma...@hotmail.com>.
My apologies, apparently the syntax that Matt provided is also valid. Just an alternate syntax that I wasn’t aware of.
Thanks
-Mark
Sent from my iPhone
> On Dec 22, 2021, at 10:17 AM, Mark Payne <ma...@hotmail.com> wrote:
>
> Just a slight clarification on the syntax. I think the maven command is:
>
> mvn clean install -P!minify-and-compress
>
> But you may need to escape the ! So you may need to run
>
> mvn clean install -P\!minify-and-compress
>
> Thanks
> -Mark
>
> Sent from my iPhone
>
>> On Dec 22, 2021, at 10:03 AM, Matt Gilman <ma...@gmail.com> wrote:
>>
>> Hi Roy,
>>
>> By default, the maven build will minify and aggregate all the front-end
>> resources. There is a profile that you can (de)activate to instead bundle
>> the resources as they are in the source. This should look something like:
>>
>> mvn clean install -P-minify-and-compress
>>
>> When running the resulting build you should be able to inspect things with
>> DevTools and set breakpoints in the debugger. Subsequent iterations can be
>> made faster by only building the necessary modules needed to bundle a new
>> front-end. Specifically, that is nifi-web-ui (don't forget to deactivate
>> minify-and-compress) and nifi-server-nar. The resulting NAR from the target
>> directory in nifi-server-nar will need to be copied to the lib directory of
>> your previously built assembly.
>>
>> Unfortunately, there is no way to run just the front-end in a dev server
>> decoupled from the backed. The NiFi front-end sources are in JSPs which
>> generate markup server side.
>>
>> Hope this helps.
>>
>> Matt
>>
>>>> On Tue, Dec 21, 2021 at 10:24 PM Roy Huang <ro...@gmail.com> wrote:
>>>
>>> Hi everyone
>>>
>>> I want to modify some css style in nifi, but I don't know how to run it in
>>> a dev environment, can you help me with that? I'm a front-end developer and
>>> don't know about java maven.
>>>
Re: How to run nifi in a development environment
Posted by Mark Payne <ma...@hotmail.com>.
Just a slight clarification on the syntax. I think the maven command is:
mvn clean install -P!minify-and-compress
But you may need to escape the ! So you may need to run
mvn clean install -P\!minify-and-compress
Thanks
-Mark
Sent from my iPhone
> On Dec 22, 2021, at 10:03 AM, Matt Gilman <ma...@gmail.com> wrote:
>
> Hi Roy,
>
> By default, the maven build will minify and aggregate all the front-end
> resources. There is a profile that you can (de)activate to instead bundle
> the resources as they are in the source. This should look something like:
>
> mvn clean install -P-minify-and-compress
>
> When running the resulting build you should be able to inspect things with
> DevTools and set breakpoints in the debugger. Subsequent iterations can be
> made faster by only building the necessary modules needed to bundle a new
> front-end. Specifically, that is nifi-web-ui (don't forget to deactivate
> minify-and-compress) and nifi-server-nar. The resulting NAR from the target
> directory in nifi-server-nar will need to be copied to the lib directory of
> your previously built assembly.
>
> Unfortunately, there is no way to run just the front-end in a dev server
> decoupled from the backed. The NiFi front-end sources are in JSPs which
> generate markup server side.
>
> Hope this helps.
>
> Matt
>
>> On Tue, Dec 21, 2021 at 10:24 PM Roy Huang <ro...@gmail.com> wrote:
>>
>> Hi everyone
>>
>> I want to modify some css style in nifi, but I don't know how to run it in
>> a dev environment, can you help me with that? I'm a front-end developer and
>> don't know about java maven.
>>
Re: How to run nifi in a development environment
Posted by Matt Gilman <ma...@gmail.com>.
Hi Roy,
By default, the maven build will minify and aggregate all the front-end
resources. There is a profile that you can (de)activate to instead bundle
the resources as they are in the source. This should look something like:
mvn clean install -P-minify-and-compress
When running the resulting build you should be able to inspect things with
DevTools and set breakpoints in the debugger. Subsequent iterations can be
made faster by only building the necessary modules needed to bundle a new
front-end. Specifically, that is nifi-web-ui (don't forget to deactivate
minify-and-compress) and nifi-server-nar. The resulting NAR from the target
directory in nifi-server-nar will need to be copied to the lib directory of
your previously built assembly.
Unfortunately, there is no way to run just the front-end in a dev server
decoupled from the backed. The NiFi front-end sources are in JSPs which
generate markup server side.
Hope this helps.
Matt
On Tue, Dec 21, 2021 at 10:24 PM Roy Huang <ro...@gmail.com> wrote:
> Hi everyone
>
> I want to modify some css style in nifi, but I don't know how to run it in
> a dev environment, can you help me with that? I'm a front-end developer and
> don't know about java maven.
>