JBoss Maven Java EE 6 Specification APIs

May 31, 2012

Java EE, Tooling

Project

The JBoss Java EE 6 Specification APIs project is hosted on GitHub (link).

The following APIs are provided by this project:

Name Version Package JSR Maven
Common
Annotations
1.1 javax.annotation 250 Artifact
EJB
Interceptors
3.1
1.1
javax.ejb
javax.interceptor
318 Artifact
Artifact
Application
Deployment
1.2 javax.enterprise.deploy 088 Artifact
JSF 2.1 javax.faces 314 Artifact
JMS 1.1 javax.jms 914 Artifact
Management 1.1 javax.management.j2ee 077 Artifact
Connector
Architecture
1.6 javax.resource 322 Artifact
JASPIC 1.0 javax.security.auth.message 196 Artifact
JACC 1.4 javax.security.jacc 115 Artifact
Servlet 3.0 javax.servlet 315 Artifact
JSP 2.2 javax.servlet.jsp
javax.el
245 Artifact
Artifact
JSTL 1.2 javax.servlet.jstl 052 Artifact
JTA 1.1 javax.transaction 907 Artifact
JAX-RS 1.1 javax.ws.rs 311 Artifact
JAXB 2.2 javax.xml.bind 222 Artifact
JAXR 1.0 javax.xml.registry 093 Artifact
JAX-RPC 1.1 javax.xml.rpc 101 Artifact
JAXM / SAAJ 1.3 javax.xml.soap 067 Artifact
JAX-WS 2.2 javax.xml.ws 224 Artifact

The following APIs are referenced by this project:

Name Version Package JSR Maven
JAF 1.1 javax.activation 925 Artifact
CDI 1.0 javax.enterprise 299 Artifact
Dependency Injection 1.0 javax.inject 330 Artifact
Web Services Metadata 2.0 javax.jws 181 Artifact
JavaMail 1.4 javax.mail 919 Artifact
JPA 2.0 javax.persistence 317 Artifact
Bean Validation 1.0 javax.validation 303 Artifact

For example, the JPA 2.0 API is provided by the Hibernate project.

Project Modules

It contains two modules:

  • JBoss Java EE 6 Web Profile APIs
  • JBoss Java EE 6 Specification APIs – All

The Web Profile module includes / references a subset of the project APIs:

  • Bean Validation
  • CDI
  • Common Annotations
  • Connector Architecture
  • Dependency Injection
  • EJB / Interceptors
  • JASPIC
  • JAX-RS
  • JAXB
  • JPA
  • JSF
  • JSP / EL
  • JSTL
  • JTA
  • Servlet

The All module creates a uber jar with all of the Java EE 6 specification APIs.

Maven

groupId: org.jboss.spec
artifactId: jboss-javaee-6.0 / jboss-javaee-web-6.0 / jboss-javaee-all-6.0

BOM

This project is a bill of materials (BOM).

  1. Specifying it in the <dependencyManagement /> element of the POM.
  2. Specify the API dependencies in the <dependencies /> element of the POM without the version element.

Example:

JBoss Trading (Parent POM)

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.jboss.spec</groupId>
            <artifactId>jboss-javaee-6.0</artifactId>
            <version>3.0.0.Final</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
    </dependencies>
</dependencyManagement>

JBoss Trading Beans (EJB JAR)

<parent>
    <groupId>com.jboss.trading</groupId>
    <artifactId>jboss-trading</artifactId>
    <version>2.1.0-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
</parent>

Specify the dependencies without the version element.

<dependencies>    
    <!-- javax.enterprise -->
    <dependency>
        <groupId>javax.enterprise</groupId>
        <artifactId>cdi-api</artifactId>
        <scope>provided</scope>
    </dependency>
    <!-- javax.persistence -->
    <dependency>
        <groupId>org.hibernate.javax.persistence</groupId>
        <artifactId>hibernate-jpa-2.0-api</artifactId>
        <scope>provided</scope>
    </dependency>
    <!-- javax.ejb -->
    <dependency>
        <groupId>org.jboss.spec.javax.ejb</groupId>
        <artifactId>jboss-ejb-api_3.1_spec</artifactId>
        <scope>provided</scope>
    </dependency>
    <!-- javax.jms -->
    <dependency>
        <groupId>org.jboss.spec.javax.jms</groupId>
        <artifactId>jboss-jms-api_1.1_spec</artifactId>
        <scope>provided</scope>
    </dependency>
    ...
</dependencies>
,

About Shane K Johnson

Technical Marketing Manager, Red Hat Inc.

View all posts by Shane K Johnson

4 Comments on “JBoss Maven Java EE 6 Specification APIs”

  1. Grzegorz Grzybek Says:

    Thanks for trying to tidy up this mess. Sun has done much harm by restricting access to these fundamental APIs and ignoring Maven Central. No we have to live with the fact that “servlet-api” or “jms-api” artifactId can be found in several groupIds (org.jboss, org.apache.geronimo, javax, …).
    But really – JBoss is doing the most good at that field. (Almost) all we need now is to wait for http://jira.codehaus.org/browse/MNG-1977 being resolved. Or better – to include global groupId aliasing in Maven…

    regards
    Grzegorz Grzybek

    Reply

  2. Stephan Says:

    Very useful article! I cannot count how many times I’ve been looking for the coordinates of a particular Java API.

    Reply

  3. martin Says:

    Very goog Article! Would be great if you could provide the same for JEE 7.

    Reply

Trackbacks/Pingbacks

  1. JavaPins - June 2, 2012

    JBoss Maven Java EE 6 Specification APIs…

    Thank you for submitting this cool story – Trackback from JavaPins…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: