[jbosstools-dev] Design Question: WTP Facets

Rob Cernich rcernich at redhat.com
Fri Jan 13 12:03:16 EST 2012


Hey Max,

Thanks again for all the info.

> > If you'd like to see the current implementation, it resides here:
> > https://github.com/jboss-switchyard/tools/tree/master/eclipse/plugins/org.switchyard.tools.ui
> 
> I would rather try it out first ;) whats the easiest way to do that
>  ? got an update site?

http://hudson.jboss.org/jenkins/job/SwitchYard-Tools/lastSuccessfulBuild/artifact/eclipse/site/target/site/

> >>> Given the above concrete example, I can either create a separate
> >>> component facet that can be added to the project
> >> 
> >> Since it is "simply" manipulating pom.xml based on switchyard
> >> being
> >> in there or not I would say this does not require a sub-facet ?
> > 
> > Yes, but it would also enable complementary facets (e.g. BPEL),
> > which I assume would enable other tools on the project (e.g.
> > validators).
> 
> Sure - not understanding why you need your own switchyard-bpel facet
> to do that ? (or did i misunderstand that part?)

This got me thinking whether we need our own or not.  I think I need it though.  The main reason is that the SwitchYard dependencies and configuration generator need to be configured accordingly (i.e. there are specific build dependencies and the configuration generator is modular with specific components for handling different technologies).

> >>> The main reason I was considering facets for components was the
> >>> ability to specify requirements on other facets (e.g. SwitchYard
> >>> Bean component requires CDI), which (I'm assuming here) would
> >>> enable existing tooling functionality for those required facets
> >>> on
> >>> the project (CDI, BPEL, etc.).  (It's also a convenient way for
> >>> adding/removing component functionality, through the Project
> >>> Facets property page.)  However, if this is not the case, then I
> >>> probably don't need to worry about facets for component specific
> >>> functionality.
> >> 
> >> That is what facets are for but SwitchYard is not the place to
> >> specify BPEL and BPMN facets is it ? That should be in those
> >> respective plugins and then you configure your facet based on
> >> this?
> > 
> > I think it really depends on what the user does.  If they create a
> > SwitchYard project, then decide they want to add a BPEL service,
> > the project settings will be updated appropriately (by
> > SwitchYard).
> 
> Yes, but again that does not require a switchyard-bpel facet…does it?

See above.  There are specific SwitchYard settings that need to be configured if is using BPEL, BPM, etc.  I don't think I can supplant the BPEL facet installer with my own.  Even if I wanted to, that would pull in plugin dependencies on BPEL.  I'd prefer to simply add it if it's available; leave it alone if it's not.  (At this point, the SwitchYard tooling can be installed directly into a clean Eclipse JEE distro.  The only additional requirement is m2e.)

Also, I should state that I don't think the user should have to manually tweak any of this.  My current plan is that if the user wants to create a service based on BPEL, the appropriate facets are installed when they create the service (i.e. NewWizard.finish()).

> >> Is that Maven stuff a hard requirement for this to work ?  Sounds
> >> weird to me ?
> > 
> > I suppose it may be, but the SwitchYard configuration generator
> > only exists in a Maven mojo.  A user could always hand-code
> > everything and JAR it up themselves.
> 
> And then he would not enable switchyard natures nor facets ?
> (i'm assuming the switchyard tooling does more than just run mojo
> configurator and add dependencies ?)

At this point, the only tooling is the builder (m2e mojo delegate) and some wizards.  I'd like to add some basic runtime support, as well as extensions to the project navigator and servers view.  A configuration editor is planned as well as other tools necessary to support development.  In general, the plan is to avoid placing nature/facet requirements onto any tools, if possible.  (For example, it's a shame the WSDL file generator can only be used on dynamic web projects.)

Thanks again for all the help.

Best,
Rob



More information about the jbosstools-dev mailing list