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
- Open your project
pom.xmlfile for editing. - Locate the
<dependencyManagement>section. - 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>
- 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-bomand2.7.0-redhat-1to use the JBoss Web Framework Kit 2.6 JBoss stack for Spring 3.2 and Snowdrop. - 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>
- Replace dependency_group and dependency_name with the appropriate dependency group and name. For example,
org.springframeworkandspring-coreto use the Spring core dependency. The version for the dependency is taken from the included JBoss stack.