4.2. Add a JBoss Stack to a Project

You must include information about the BOM for each JBoss stack in your project pom.xml file, as detailed in the procedure below, to take advantage of the certified stacks.

Procedure 4.1. Add a JBoss Stack to a Project

  1. Open your project pom.xml file for editing.
  2. Locate the <dependencyManagement> section.
  3. Within the <dependencies> tags, add the following:
    <dependency>
       <groupId>stack_group</groupId>
       <artifactId>stack_name</artifactId>
       <type>pom</type>
       <version>stack_version</version>
       <scope>import</scope>
    </dependency>
  4. Replace stack_group, stack_name and stack_version with the appropriate JBoss stacks group and the individual JBoss stack name and version. For example, replace with com.redhat.jboss.wfk.boms, spring-3.2-bom and 2.7.0-redhat-1 to use the JBoss Web Framework Kit 2.6 JBoss stack for Spring 3.2 and Snowdrop.
  5. Within the <dependencies> tags that follow the <dependencyManagement> section, add the following for each dependency required by your project:
    <dependency>
       <groupId>dependency_group</groupId>
       <artifactId>dependency_name</artifactId>
    </dependency>
  6. Replace dependency_group and dependency_name with the appropriate dependency group and name. For example, org.springframework and spring-core to use the Spring core dependency. The version for the dependency is taken from the included JBoss stack.