JBoss.orgCommunity Documentation
Maven integration is included by default, allowing you to create mavenized Seam projects and use Seam tools with imported Maven projects.
Maven Integration makes the Seam Wizard capable of creating Maven ready projects to let Maven get the libraries instead of using the Seam runtime.
To create a mavenized Seam project you should perform the following steps:
Navigate to
→ → → . Give the project a meaningful name, specify a target runtime and server and select the proper configuration for your Seam project:Click the Modify button to enable the Jboss Maven Integration facet:
On the JBoss M2 capabilities page you'll be prompted to add the following maven properties: groupId, artifactId, version, packaging, name and description. Here it's possible to set a maven version of Seam and also decide whether to remove WTP classpath containers (where the path starts with org.eclipse.jst).
On the JSF Capabilities page you can choose Maven as libraries provider. This is possible when you use Seam version compatible Maven JSF Libraries as a type of JSF Implementing Library. Also it gives you capability to edit Dependencies and Exclusions for the mavenized Seam project directly from the wizard.
On the Seam Facet page configure the Seam Facet settings and click Finish:
The organized Seam project contains five projects with the Maven nature, builder, Maven classpath and the pom.xml files added: projectname, projectname-ear, projectname-ejb, projectname-parent and projectname-test.
Maven Integration includes the Seam Maven configurator which is called when importing a project, changing pom.xml and/or calling → When importing a Maven Seam project, the Seam Maven configurator picks up the settings set up in pom.xml and adds to the project the following:
Seam nature
Seam facet and dependent facets to the EJB, EAR and WAR projects
JBoss Maven Integration facet if the Maven project contains a dependency with the org.jboss.seam groupId and an artifactId starting with 'jboss-seam'
other required facets (Web Module, Java, JSF, etc.)
If the Seam version from pom.xml matches a version of a Seam runtime configured in the workspace, Seam configurator will set that runtime, otherwise no Seam runtime will be set and you'll have to set it manually under Section 10.2, “Project Preferences”.
Seam configurator recognizes the Seam artifacts in the following way: the view folder is a web content folder from the WAR project, the source folder is the first Eclipse source folder. If there is a folder containing "hot" in the name, it will be chosen as the action source folder. Package is the first package that has children or doesn't have any subpackage.
Configuring the Seam when importing a Maven project as well as a Seam Runtime, Seam artifacts and some facets could be suspended in the JBoss Maven Integration preferences (
→ → → ).