[jbosstools-dev] JBoss Maven Integration Facet?

Max Rydahl Andersen max.andersen at redhat.com
Mon Sep 26 06:19:08 EDT 2011


> Thanks Fred.  I'll incorporate that into the SwitchYard configurator once I create a true SwitchYard facet and runtime component.  I've got a much better idea of how all these pieces fit together now.

Another important thing is that Facet's are the best way of making something in eclipse that play well with rest of the JEE/Faceted dependent features, but Facet's should *not* be used (at least not by default) as a
marker to detect if some feature should be enabled or not (since it prevents users with existing projects to get started)

For that natures are much better since they are a core part of eclipse and will work on projects no matter if you have maven or facet on your project.

i.e. Eclipse Dali's project for supporting JPA (java persistence) have for a long time required that the Dali Facet have to be installed on a project before their
persistence.xml editor becomes useful (i.e. not just showing the source page). Their structured xml editor is deeply dependent on dali specific project generated data, even though 90% of the features they provide
in the editor does not need it. Very annoying.

Another example is if our VPE editor would only open html files if in a web project.

Both cases would severely make it hard to get even the basic features in the IDE to work unless you have the perfectly configured project - which is hard for users trying to use their existing projects.

Thus for example in case of Eclipse Dali - they should not check for Dali facet, they should just look if the needed metadata is available and if not just stub out those *few* features in their editor which is dependent on it.

Similar for VPE we check if certain natures/builders and metadata is available and inform users about it so they can know the experience can be better - but otherwise we get out of their way and provide
as many features we can without the collected metadata. 

Thus its important to realize Facet's are used to configure eclipse natures/builders/project content - much like m2e's project configurators are - except Facet's are maven independent.
All your editors, wizards, etc. should be checking for natures/builders to know what can be enabled or not and try and be flexible to the user so he doesn't have to setup the perfect project to get started using
the tools - in switchyard case, the editors and wizards should be able to work fine without any switchyard stuff enabled on the project IMO; at least for the basic artifact creation.  

/max




More information about the jbosstools-dev mailing list