Maven Tools

< Main Index Hibernate Tools >

JBoss Maven Integration

Maven Profile selection interface

The JBoss Tools Maven integration features a brand new Maven Profile selection interface that will ease switching between different profiles.
Rather than right-clicking on a project, going to the Properties > Maven page, then manually (mis)typing a list of active or disabled profile, You just use the Ctrl+Alt+P shortcut to open the new Maven Profile selection interface :

The new interface is also accessible from the Maven contextual menu :
Right-click on project > Maven > Select Maven Profiles...

The list of available profiles is inferred from profiles defined in :

  • the project pom.xml
  • the project's parent hierarchy
  • user and global maven settings.xml
The source columns indicates where the profile is defined. An undefined source means the profile is present in the Maven property page of the project, but there is no available definition.
You can right-click on a profile to (de)activate it. The list of (in)active profiles for the project is updated as you manage the profiles in the upper text area. What you select is what you get in the Maven property page of the project.

When several projects are selected, only the common available profiles are displayed for selection. Common profiles are profiles defined in settings.xml or profiles having the same id in different pom.xml.

Since only a subset of profiles are selected, the "Available profiles" text area is hidden. Each project may have a different profile settings, all non-common profiles are kept unmodified

See JBIDE-8969 for more details.

New JAX-RS configurator

If a maven project has a dependency on any JAX-RS API (resteasy, jersey ...), the JAX-RS Facet will be automatically applied during m2e's project configuration.
The JAX-RS configurator feature can be selected from the Maven Support category in the JBoss Tools update site :

See JBIDE-9290 , for more details.

New JBoss SAR configurator

Mavenized JBoss Service Archive projects can now be configured automagically with the new JBoss SAR configurator. The jboss-sar packaging must be enabled via the jboss-packaging-maven-plugin.
The configurator reads the jboss-packaging SAR configuration and installs the new JBoss SAR facet to the project.
SAR projects can be deployed within EARs (being declared as dependencies), or standalone on JBoss application servers (right-click on project > Run As > Run on Server).

The JBoss SAR configurator is part of the JBoss Packaging Maven Configurators feature, from the Maven Support category in the JBoss Tools update site :

For more details, see :
- JBIDE-9497

Better JSF detection

The JSF configurator now adds the JSF Facet automatically, depending on the JSF classes found on the project classpath. It means jboss-jsf-api, mojarra, myfaces or any other dependency bringing JSF classes now triggers the JSF facet installation.

See JBIDE-9242 , for more details.

JBoss Maven repository available in m2e's XML editor

If you ever need to declare one of the JBoss maven repositories in your settings.xml (or pom.xml, if you plan on easing the distribution of an example project on Internet), then you can add a <repositories> element to your document, press Ctrl + Space for content assist and easily add one of the JBoss repositories :

  • The JBoss public repository (releases and snapshots) : composite repository of several major repositories.
  • The JBoss artifacts repository (releases) : containing JBoss community project artifacts
Keep in mind that putting repositories in your POMs is a Bad Idea. So try to keep the repositories in your settings.xml (Windows > Preferences > Maven > User settings > open file).

See JBIDE-9321 , for more details.