3

I am using JBoss EAP 6.1 and Java EE 6.

JBoss tools add the JBoss runtime libraries, like org.jboss.resteasy.annotations.cache.NoCache on eclipse, but it fails to compile on maven because maven knows nothing about it.

I would like to add all JBoss EAP libraries through maven in order to build it successfully. Is it documented somewhere the artifacts I have to use to be able to add all JBoss EAP libraries in the classpath? Is there a single dependency I can add representing the whole Java EE 6 stack and its JBoss extensions like org.jboss.resteasy.annotations.cache.NoCache?

I was looking for something like:

<dependency>
  <groupId>org.jboss.eap</groupId>
  <artifactId>jboss-eap</artifactId>
  <version>6.1</version>
  <type>pom</type>
  <scope>provided</scope>
</dependency>

Then we just change <version>6.2</version> when we update the container and boom, magic!

Fagner Brack
  • 2,365
  • 4
  • 33
  • 69

1 Answers1

2

This information is in the pom.xml files included in the quickstarts bundled with JBoss.

From the kitchensink example:

    <dependencies>
        <!-- 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-with-tools stack (you can 
            read this as the JBoss stack of the Java EE 6 APIs, with some extras tools 
            for your project, such as Arquillian for testing) and the jboss-javaee-6.0-with-hibernate 
            stack you can read this as the JBoss stack of the Java EE 6 APIs, with extras 
            from the Hibernate family of projects) -->
        <dependency>
            <groupId>org.jboss.bom.eap</groupId>
            <artifactId>jboss-javaee-6.0-with-tools</artifactId>
            <version>${version.jboss.bom.eap}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.bom.eap</groupId>
            <artifactId>jboss-javaee-6.0-with-hibernate</artifactId>
            <version>${version.jboss.bom.eap}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>

The ${version.jboss.bom.eap} is defined in the parent pom

    <!-- Define the version of the JBoss BOMs we want to import to specify tested stacks. -->
    <version.jboss.bom.eap>6.2.0.GA</version.jboss.bom.eap>

This is explained here https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.1/html/Development_Guide/Maven_BOM_Usage.html (requires redhat support account)

JBoss component versions are also listed here https://access.redhat.com/articles/112673

shonky linux user
  • 6,131
  • 4
  • 46
  • 73