API for development

API for development

Eclipse GlassFish provides several APIs to build applications and components:

  • Jakarta EE API - Platform or Web profile, depends on the Eclipse GlassFish distribution

  • MicroProfile API - selected specifications, only avaiable in Eclipse GlassFish Full

  • GlassFish API - to access other functionality provided by Eclipse GlassFish

GlassFish API is composed of a few sets of APIs:

  • GlassFish API

  • GlassFish EE API

  • Simple GlassFish API

GlassFish API

Most of the functionality specific to Eclipse GlassFish is available in the GlassFish API. To compile applications or components, add the glassfish-api.jar to the compile classpath. You may also need scattered-archive-api.jar.

The glassfish-api.jar is located in the Eclipse GlassFish installation in as-install/modules/glassfish-api.jar.

In Maven project, you can add it as the following dependency:

<dependency>
    <groupId>org.glassfish.main.common</groupId>
    <artifactId>glassfish-api</artifactId>
</dependency>

This will already add scattered-archive-api.jar as a transitive dependency.

GlassFish EE API

GlassFish EE API provides functionality related to Jakarta EE. To compile applications or components, add the glassfish-ee-api.jar to the compile classpath.

The glassfish-ee-api.jar is located in the Eclipse GlassFish installation in as-install/modules/glassfish-ee-api.jar.

In Maven project, you can add it as the following dependency:

<dependency>
    <groupId>org.glassfish.main.common</groupId>
    <artifactId>glassfish-ee-api</artifactId>
</dependency>

Simple GlassFish API

Simple GlassFish API provides basic functionality to deploy applications and run admin commands. Mostly to use embedded Eclipse GlassFish programmatically. To compile applications or components, add the simple-glassfish-api.jar to the compile classpath.

The simple-glassfish-api.jar is located in the Eclipse GlassFish installation in as-install/modules/simple-glassfish-api.jar.

In Maven project, you can add it as the following dependency:

<dependency>
    <groupId>org.glassfish.main.common</groupId>
    <artifactId>simple-glassfish-api</artifactId>
</dependency>