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>6.10.0</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 repository Payara Examples/. See the ecosystem/payara-bom/bom-import/ subproject for more details.

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 and 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

This is a non-exhaustive list of dependencies. By default all are declared in their respective default scopes, but it is more correct to use them with scope provided if they are already present in the server’s internal modules.

Artifact Example usage Note

Jersey

<dependency>
  <groupId>org.glassfish.jersey.core</groupId>
  <artifactId>jersey-client</artifactId>
  <scope>test</scope>
</dependency>
<dependency>
  <groupId>org.glassfish.jersey.inject</groupId>
  <artifactId>jersey-hk2</artifactId>
  <scope>test</scope>
</dependency>

Example: JAX-RS clients in tests. All artifacts of the Jersey BOM are imported.

Hibernate Validator

<dependency>
  <groupId>org.hibernate.validator</groupId>
  <artifactId>hibernate-validator</artifactId>
  <scope>test</scope>
</dependency>

EclipseLink - JPA Metamodel generator

<dependency>
  <groupId>org.eclipse.persistence</groupId>
  <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
</dependency>

The only dependency that is provided scoped, as it is an annotation processor.

EclipseLink

<dependency>
  <groupId>org.eclipse.persistence</groupId>
  <artifactId>org.eclipse.persistence.jpa</artifactId>
  <scope>provided</scope>
</dependency>

Hazelcast

<dependency>
  <groupId>com.hazelcast</groupId>
  <artifactId>hazelcast</artifactId>
  <scope>provided</scope>
</dependency>

The hazelcast-kubernetes dependency is also available.

Jackson

<dependency>
  <groupId>com.fasterxml.jackson.datatype</groupId>
  <artifactId>jackson-datatype-jdk8</artifactId>
</dependency>

All artifacts of the Jackson BOM are imported.

Yasson

<dependency>
  <groupId>org.eclipse</groupId>
  <artifactId>yasson</artifactId>
  <scope>test</scope>
</dependency>

Tyrus

<dependency>
  <groupId>org.glassfish.tyrus</groupId>
  <artifactId>tyrus-client</artifactId>
  <scope>test</scope>
</dependency>
<dependency>
  <groupId>org.glassfish.tyrus</groupId>
  <artifactId>tyrus-container-grizzly-client</artifactId>
  <scope>test</scope>
</dependency>