Dependency Management with org.jboss.spec and org.jboss.as
nchivukula Sep 21, 2013 7:51 AMHello,
I have been working through some examples to run EJB3.1 client remotely against EJB deployed on JBoss AS 7.1.1 Final. I'm struggling to make out how the following dependency management resolve other dependencies in ejb-remote quickstart example.
<dependencyManagement>
<dependencies>
<!-- Define the version of JBoss' Java EE 6 APIs we want to use -->
<!-- JBoss distributes a complete set of Java EE 6 APIs including
a Bill of Materials (BOM). A BOM specifies the versions of a "stack" (or
a collection) of artifacts. We use this here so that we always get the correct
versions of artifacts. Here we use the jboss-javaee-6.0 stack (you can
read this as the JBoss stack of the Java EE 6 APIs). You can actually
use this stack with any version of JBoss AS that implements Java EE 6, not
just JBoss AS 7! -->
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>${version.jboss.spec.javaee.6.0}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-ejb-client-bom</artifactId>
<version>${version.jboss.as}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
...
<!-- Import the EJB 3.1 API, we use runtime scope because we aren't using any direct
reference to EJB spec API in our client code -->
<dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
<scope>runtime</scope>
</dependency>
<!-- JBoss EJB client API jar. We use runtime scope because the EJB client API
isn't directly used in this example. We just need it in our runtime classpath -->
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-ejb-client</artifactId>
<scope>runtime</scope>
</dependency>
....
<!-- client communications with the server use XNIO -->
<dependency>
<groupId>org.jboss.xnio</groupId>
<artifactId>xnio-api</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.jboss.xnio</groupId>
<artifactId>xnio-nio</artifactId>
<scope>runtime</scope>
</dependency>
...
</dependencies>
I understand the above dependency management would automatically resolve dependencies with same groupIds/extended like org.jboss.spec.* and org.jboss.as.* without version tags. But, I can't get my head around of how maven resolves org.jboss.* groupIds without version tag?
Cheers