Maven Bill Of Materials Artifact

The Payara Platform consists of many artifacts and it depends on lots of APIs as well as their implementations. Having matching versions of these dependencies will prevent classloading issues at runtime. To this effect, the Payara Platform’s Bill Of Materials (BOM) artifact collects all of these versions for the following categories:

  • Payara Platform Distribution artifacts

  • Payara Platform Client libraries

  • Jakarta EE, Eclipse Microprofile and OSGi APIs

  • Arquillian Container Adapters

  • Implementations and libraries included in Payara Server (see the list below)

Quick Start

To make use of the BOM, you need to list the artifact in dependencyManagement section of your project in scope import. Some of the artifacts are Payara-specific patch versions which are available in our repository payara-artifacts.

Add following snippet to your Maven project:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>fish.payara.api</groupId>
            <artifactId>payara-bom</artifactId>
            <version>5.2022.4</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<!-- Some of the referenced APIs in POM are Payara's patched versions.
      These are published in following repo: -->
<repositories>
    <repository>
        <id>payara-patched-externals</id>
        <name>Payara Patched Externals</name>
        <url>https://nexus.payara.fish/repository/payara-artifacts/</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>

</repositories>

An example application utilizing the BOM can be seen in the Payara Examples repository. See specifically the ecosystem/payara-bom/bom-import subproject for an example of using the Payara BOM.

BOM Contents

The following is a summary of all dependencies included in the BOM, grouped by category.

Payara Platform Distributions

Distribution artifacts do not define a Maven scope and are therefore imported in compile scope.

Artifact Example usage Note

Payara Server

<dependency>
  <groupId>fish.payara.distributions</groupId>
  <artifactId>payara</artifactId>
  <type>zip</type>
</dependency>

Also available are payara-ml
payara-web
payara-web-ml

Payara Micro

<dependency>
  <groupId>fish.payara.extras</groupId>
  <artifactId>payara-micro</artifactId>
</dependency>

Payara Embedded

<dependency>
  <groupId>fish.payara.extras</groupId>
  <artifactId>payara-embedded-all</artifactId>
</dependency>

Also available
payara-embedded-web

EJB HTTP Client

<dependency>
  <groupId>fish.payara.extras</groupId>
  <artifactId>ejb-http-client</artifactId>
</dependency>

Appclient

<dependency>
  <groupId>fish.payara.server.appclient</groupId>
  <artifactId>payara-client</artifactId>
</dependency>

Payara Public API

<dependency>
  <groupId>fish.payara.api</groupId>
  <artifactId>payara-api</artifactId>
</dependency>

Standard APIs

Standard APIs are defined in provided scope, as they already include classes that are present in the server’s runtime.

Artifact Example usage Note

Jakarta EE

<dependency>
  <groupId>jakarta.platform</groupId>
  <artifactId>jakarta.jakartaee-api</artifactId>
</dependency>

Also available jakarta.jakartaee-web-api and all individual API artifacts.

Eclipse Microprofile

<dependency>
  <groupId>org.eclipse.microprofile</groupId>
  <artifactId>microprofile</artifactId>
  <type>pom</type>
</dependency>

Individual APIs are also declared.

OSGi

<dependency>
  <groupId>org.osgi</groupId>
  <artifactId>org.osgi.core</artifactId>
</dependency>

Also available are org.osgi.compendium, org.osgi.enterprise

Test Frameworks and Other Tools

Arquillian is the recommended way to run integration tests written for Payara Server. Payara Platform provides multiple connectors fitting the deployment scenarios. These artifacts are declared in scope test.

Payara Server includes the H2 database, so their matching versions are also declared, but in their default scope.

Artifact Example usage

Arquillian container - Remote

<dependency>
  <groupId>fish.payara.arquillian</groupId>
  <artifactId>arquillian-payara-server-remote</artifactId>
</dependency>

Arquillian container - Embedded

<dependency>
  <groupId>fish.payara.arquillian</groupId>
  <artifactId>arquillian-payara-server-embedded</artifactId>
</dependency>

Arquillian container - Managed

<dependency>
  <groupId>fish.payara.arquillian</groupId>
  <artifactId>arquillian-payara-server-managed</artifactId>
</dependency>

Arquillian container - Payara Micro

<dependency>
  <groupId>fish.payara.arquillian</groupId>
  <artifactId>arquillian-payara-micro-managed</artifactId>
</dependency>

H2 Database

<dependency>
  <groupId>com.h2database</groupId>
  <artifactId>h2</artifactId>
  <scope>test</scope>
</dependency>

Libraries and API implementations

To prevent conflicts on the classpath, libraries and API implementations already provided by Payara Server should be added as a dependency with the scope provided and the version provided by the Payara BOM.