JBoss EAP BOMs: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 21: Line 21:


=EAP 6=
=EAP 6=
* org.jboss.bom eap6-supported-artifacts https://maven.repository.redhat.com/ga/org/jboss/bom/eap6-supported-artifacts/6.4.15.GA/eap6-supported-artifacts-6.4.15.GA.pom
* jboss-javaee-6.0-with-logging https://maven.repository.redhat.com/ga/org/jboss/bom/eap/jboss-javaee-6.0-with-logging/6.4.15.GA/jboss-javaee-6.0-with-logging-6.4.15.GA.pom
* jboss-javaee-6.0: it contains the Java EE Specification API JARs used by JBoss EAP. This BOM is versioned based ...?
===EAP 6 BOM Usage Example===


See  
See  
Line 35: Line 29:


{{External|https://github.com/NovaOrdis/playground/tree/master/jboss/bom/eap6}}
{{External|https://github.com/NovaOrdis/playground/tree/master/jboss/bom/eap6}}
More details about EAP 6 and Maven are available here:
{{External|https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Development_Guide/chap-Maven_Guide.html}}
* org.jboss.bom eap6-supported-artifacts https://maven.repository.redhat.com/ga/org/jboss/bom/eap6-supported-artifacts/6.4.15.GA/eap6-supported-artifacts-6.4.15.GA.pom
* jboss-javaee-6.0-with-logging https://maven.repository.redhat.com/ga/org/jboss/bom/eap/jboss-javaee-6.0-with-logging/6.4.15.GA/jboss-javaee-6.0-with-logging-6.4.15.GA.pom
* jboss-javaee-6.0: it contains the Java EE Specification API JARs used by JBoss EAP. This BOM is versioned based ...?


=Relationship between BOM and EAP Version=
=Relationship between BOM and EAP Version=

Revision as of 22:01, 6 September 2017

Internal

Overview

The specification of one more more supported JBoss dependencies in a build does not guarantee that all transitive dependencies of the build are resolved to supported dependencies. This is the reason behind using JBoss-curated BOM (bills of materials). These BOMs insure that Maven will prioritize supported JBoss artifacts for all direct and transitive dependencies in the build.

JBoss EAP BOMs are used like any other BOMs:

Using a BOM

The JBoss BOMs are being developed here: https://github.com/jboss-developer/jboss-eap-boms. Different branches are maintained for different JBoss EAP versions. Then they are published in the RedHat General Availability Maven Repository.

EAP 7

More details about EAP 7 and Maven are available here:

https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html-single/development_guide/#use_the_maven_repository

EAP 6

See

https://github.com/NovaOrdis/playground/blob/master/jboss/bom/eap6/pom.xml

Full example available here:

https://github.com/NovaOrdis/playground/tree/master/jboss/bom/eap6

More details about EAP 6 and Maven are available here:

https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Development_Guide/chap-Maven_Guide.html



Relationship between BOM and EAP Version

The EAP version is specified directly in the BOM declaration. For EAP 6:

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.jboss.bom</groupId>
      <artifactId>eap6-supported-artifacts</artifactId>
      <version>6.4.15.GA</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>


JBoss BOMs Organizatorium

There is a dependency management BOM included in the JBoss EAP Maven repository, which specifies all the supported JBoss EAP binary artifacts. This BOM can be used in a build to ensure that Maven will prioritize supported JBoss EAP dependencies for all direct and transitive dependencies in the build. In other words, transitive dependencies will be managed to the correct supported dependency version where applicable. The version of this BOM matches the version of the JBoss EAP release.

<dependency>
  <groupId>org.jboss.bom</groupId>
  <artifactId>eap-runtime-artifacts</artifactId>
  <version>7.0.0.GA</version>
  <type>pom</type>
  <scope>import</scope>
 </dependency>


eap6-supported-artifacts


The jboss-javaee-7.0 BOM contains the Java EE Specification API JARs used by JBoss EAP.

To use this BOM in a project, add a dependency for the GAV that contains the version of the JSP and Servlet API JARs needed to build and deploy the application.

The following example uses the 1.0.3.Final-redhat-1 version of the jboss-javaee-7.0 BOM.

<dependencyManagement>
 <dependencies>
   <dependency>
     <groupId>org.jboss.spec</groupId>
     <artifactId>jboss-javaee-7.0</artifactId>
     <version>1.0.3.Final-redhat-1</version>
     <type>pom</type>
     <scope>import</scope>
   </dependency>
   ...
 </dependencies>
</dependencyManagement>
<dependencies>
 <dependency>
   <groupId>org.jboss.spec.javax.servlet</groupId>
   <artifactId>jboss-servlet-api_3.1_spec</artifactId>
   <scope>provided</scope>
 </dependency>
  ...
</dependencies>