[jbosstools-dev] JBoss Maven Integration Facet?

Fred Bricon fbricon at redhat.com
Fri Sep 23 11:21:56 EDT 2011


You need to implement 
org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator.configure(ProjectConfigurationRequest 
request, IProgressMonitor monitor) which will be called during maven 
project import or a manual trigger of "Maven > Update Project 
Configuration". Reading 
http://wiki.eclipse.org/M2E_Extension_Development can be helpful (or not!)

Examples of Facet installation can be found in the source of JBoss Tools 
(ex: 
http://svn.jboss.org/repos/jbosstools/trunk/maven/plugins/org.jboss.tools.maven.jaxrs/src/org/jboss/tools/maven/jaxrs/configurators/JaxrsProjectConfigurator.java) 
or m2eclipse-wtp (ex: 
https://github.com/sonatype/m2eclipse-wtp/blob/master/org.maven.ide.eclipse.wtp/src/org/maven/ide/eclipse/wtp/WebFragmentProjectConfigurator.java)
The configurator needs to be declared in both plugin.xml and 
lifecycle-mapping.xml, present at the root of the eclipse plugin.

HIH

Fred Bricon

On 23/09/2011 16:18, Rob Cernich wrote:
> Hey Snjeza,
>
> Thanks for the reply.
>
>> If you want to create a Maven project using a WTP project wizard
>> (dynamic web project, ejb project, ear project, utility project ...),
>> you have to add the JBoss Maven integration facet that will add the
>> Maven builder/nature to the project. It will create pom.xml and the
>> corresponding maven plugin (war, ejb, ear) and enable you to add
>> Maven
>> dependencies using Maven Library Provider
>> (https://issues.jboss.org/browse/JBIDE-4565).
>>
>> The JBoss Maven Integration facet is also obliged if you want to use
>> some of the JBoss Maven configurators (JSF, CDI, Seam 2, Portlet,
>> Hibernate ...).
> This use case helps me better understand the purpose of the maven facet.
>
> On a related note, is there a hook for configuring project facets during a project import, specifically import existing maven project?
>
> Thanks again,
> Rob
> _______________________________________________
> jbosstools-dev mailing list
> jbosstools-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jbosstools-dev



More information about the jbosstools-dev mailing list