[jbosstools-dev] Design Question: WTP Facets

Max Rydahl Andersen max.andersen at redhat.com
Thu Jan 12 06:24:17 EST 2012


>> Yes, but how ? are you using jboss tools maven integration for this
>> which enables maven for WTP projects in general or how ?
> 
> I use m2e, with a soft dependency on JBT Maven integration.  (I use a dynamic preset for the "core" SwitchYard settings, which includes jboss.m2 if it is available.)  m2e-wtp provides configurators for setting up the deployables correctly.  As for adding the dependencies, that's just straight m2e.  And facet configuration is done by a m2e project configurator which detects the presence of the SwitchYard mojo.
> 
> 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?

>>> 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?)
 
>>> or I can have a SwitchYard property page on the project that can be
>>> used for configuring SwitchYard capabilities on the project.  In
>>> the latter case, that could even mean applying component facets
>>> when the user modifies the configuration.
>> 
>> That is what the Facet configuration UI or the Configure Project
>> submenu is for….wether there is a property page or not I'm not sure.
>> Doesn't hurt I guess.
> 
> That allows the facet set to be configured, but doesn't directly support configuration of the individual facets once they've been installed.

Yes, since that should be done elsewhere. Preferences/property pages.

But you are talking about enabling/disabling other facets.

>>> 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?

>>> Some more background on SwitchYard in general.  SwitchYard
>>> functionality can be included in any JEE archive.  The simplest
>>> case is a stand-alone SwitchYard application, which is packaged
>>> and deployed as a utility JAR.  However, the SwitchYard facet may
>>> be added to an existing WEB project (so long as it's a Maven based
>>> project), which configures the project appropriately for
>>> SwitchYard.
>> 
>> 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 ?)

/max
http://about.me/maxandersen






More information about the jbosstools-dev mailing list