Andrew Rubinger wrote:
If the BOM is the parent of the ejb3_1 module, then the ejb3_1 module will have the correct exported dependencies. Now something else, project X, makes a depedendency upon ejb3_1. Any "exclusion"s defined by the BOM will be *ignored*. This is because Project X doesn't have the BOM in its hierarchy. The way around this is to declare in Project X a dependency twice upon ejb3_1; once in "dependencies", once in "dependencyManagement" (with scope import).
S,
ALR
The project X that I was considering was AS. So we would have something like:
ejb3_1 module pom.xml:
<parent>
<artifactId>bom-as6</artifactId>
<version>0.1.3</version>
</parent>
<artifactId>jboss-ejb3_1</artifactId>
bom-as6 pom.xml:
<artifactId>bom-as6</artifactId>
<dependencyManagement>
<dependency>
<artifactId>jboss-ejb3-core</artifactId>
<version>1.3.2</version>
</dependency>
</dependencyManagement>
JBoss AS component-matrix pom.xml (or some module which "imports" the bom)
<dependencyManagement>
<dependency>
<artifactId>bom-as6</artifactId>
<scope>import</scope>
</dependency>
</dependencyManagement>
The AS/ejb3 module pom.xml would add "dependency" on *ejb3_1*
<dependencies>
<dependency>
<artifactId>jboss-ejb3_1</artifactId>
</dependency>
</dependencies>
But like I said in my previous post, making bom-as6 the parent of ejb3_1 may not work out.