Thanks for the responses, all. Perhaps I can explain a bit better what I am
talking about.
Warning up front: this is long and has screenshots!
My intent currently is not to write new processors or do much of any backend
work, but rather to extend and improve the functionality of the NiFi UI (i.e.,
the web-app). This necessitates the ability to easily browse and work with all
of these artifacts. Currently I do the following (or some variation thereof;
the idea is generally the same.)
Primary
1. Build the project per the instructions in the quickstart guide for
developers. [1]
2. Run mvn eclipse:eclipse to generate eclipse project files.
3. Import existing maven project in to eclipse.
Alternate
1. Same as step one above.
2. Import source code manually and let eclipse create the projects for me.
I have the option of importing as many or as few of NiFi's modules and
submodules (translated to projects per the maven eclipse plugin) as I would
like. Unfortunately they are all imported as Maven Java projects (or simple
Maven projects if they have no Java source at all). The majority of the
frontend related module has the following directory structure:
module
|
|--src
|
|--main
|
|--java
| |
| |--org.apache.nifi.etc (package structure, java files, etc.)
| |
| |--resources
| |
| |--filters
| | |
| | |--(various .properties files – canvas.properties,
summary.properties, etc.)
| |
| |--META-INF
| |--LICENSE
|
|--webapp
|
|--css
| |
| |-- (various .css files for that specific module)
|
|--images
| |
| |-- (various image files for that specific module)
|
|--js
| |
| |-- (various .js files for that specific module)
|
|--WEB-INF
| |
| |--pages
| | |
| | |-- (various .jsp files)
| |
| |--partials
| | |
| | |-- (more folders, with more .jsp files)
|
|--web.xml (mappings for servlets)
As you can imagine, using a typical java project in eclipse for this sort of
structure, and for these sorts of files, is an exercise in frustration. A
solution for this is to make this specific project faceted. For this project,
which by the way is nifi-web-ui, I’ve selected the following facets:
· Dynamic Web Module
· Java
· JavaScript
· JAX-RS (REST Web Services)
· Jpt.jaxb
And there are many more options, many of which are incompatible with each
other. Here is a screenshot of what is available with the stock Eclipse for
Java EE:
[cid:[email protected]]
And this is how the project looks in project explorer once I’ve done this –
and, keep in mind, I’m not even sure these are the correct facets for the
project. I have manually added the webapp folder as a source folder under right
click -> build path -> use as source folder. Note that it is treating webapp as
a Java resource rather than a JavaScript (or any other) resource.
[cid:[email protected]]
A point of note: Deployment Descriptor: nifi-web-ui, as seen here below, is
essentially empty. I don’t know enough about frontend projects of this
magnitude or style to know that getting that filled in would help matters, but
I think that it would; regardless, I’ve no clue how.
[cid:[email protected]]
I apologize if this sounds like I’m trying to debug eclipse; in truth, I’m just
trying to get this project set up so that I don’t have to fight the IDE to get
things done. ☺
Thanks in advance for any help!
Kristin Clemens
[1] http://nifi.incubator.apache.org/quickstart.html
-----Original Message-----
From: Toivo Adams [mailto:[email protected]]
Sent: Sunday, May 31, 2015 7:15 AM
To: [email protected]
Subject: Re: Best dev environment setup for front-end work?
I use Eclipse and have done some Nifi development using Eclipse also.
Eclipse is wonderful tool but Maven and Git integration feels like little bit
unfinished.
But this is no way related to NiFi.
I usually check out NiFi source using command line Git (and not Eclipse Egit).
After that I import NiFi stuff using Eclipse import...
This way Eclipse builds correct Maven projects structure under Eclipse.
NiFi development can be done using Eclipse and I am not sure switching to other
IDE will help.
NiFi projects structure is at first little bit complicated, but perfectly
usable.
Maybe this help you to create your own project:
https://issues.apache.org/jira/browse/NIFI-272
Once you have your project structure created, you can add your code and
dependencies to web jars under
nifi-donothing-processors
I personally have created new NiFi project structure (for my own NiFi
processors) manually
- works also, but more typing.
Is “web-app” any way related to war files and possibly some container – Tomcat?
Hope this helps,
Toivo
--
View this message in context:
http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/Best-dev-environment-setup-for-front-end-work-tp1665p1668.html
Sent from the Apache NiFi (incubating) Developer List mailing list archive at
Nabble.com.