Independent extensions:

RSS Feeds

Pages and Blog posts
Mailing list


JSR88-compliant containers support


Cargo supports JSR 88: J2EE Application Deployment API, allowing it to be used with any JSR88-compliant container.

The core functionality is implemented by the o.c.c.container.spi.deployer.AbstractJsr88Deployer class (a Deployer implementation), which acts as a proxy to the JSR88 DeploymentManager.

GlassFish 3.x to 5.x and Payara

GlassFish 6.x and remote deployment

The GlassFish 6.x container doesn't have any remote deployers yet, as GlassFish 6.0 lacks JSR-88 support and it is unclear whether this will be included in a future release.

Until then, please follow the remote deployment instructions for GlassFish 6.x.

The GlassFish 3.x, GlassFish 4.xGlassFish 5.x and Payara remote containers use the JSR-88 API. For the connection to succeed, the following JARs need to be in the container classpath or in the current Java Thread's context classloader:

  • deployment-client.jar and its dependencies - for GlassFish 3.x, these seem to be:
    • admin-cli.jar
    • auto-depends.jar
    • common-util.jar
    • glassfish-api.jar
    • deployment-common.jar
    • hk2-core.jar

Here is an example code for the users of the Java API:

List<URL> urls = new ArrayList<URL>();

// Add many libraries from GlassFish
for (File jar : new File(this.localContainer.getHome(), "glassfish/modules").listFiles())
    if (jar.isFile())

// Create a ClassLoader contaning all these JARs
URL[] urlsArray = new URL[urls.size()];
urlsArray = urls.toArray(urlsArray);
URLClassLoader classLoader = new URLClassLoader(urlsArray, Thread.currentThread().getContextClassLoader());

// Now, create the GlassFish Remote container

Here is an example Maven 3 plugin configuration:


When adding the org.glassfish.deployment:deployment-client dependency, please make sure that the version matches exactly the targeted GlassFish server's version (beware the updates that you install on GlassFish, these indeed change the version of your server); else you might run into unexpected surprises like:

error submitting remote command: com.sun.enterprise.admin.cli.CommandException:
   CLI001 Invalid Command: list: InvalidCommandException -> [Help 1]


GlassFish list help command report

Exit Code : SUCCESS
list - null

GeneratedHelp true
SYNOPSIS Usage: list [--monitor=false] pattern %%%EOL%%%

The list of versions you can choose from can be found on:

Copyright 2004-2021. All rights reserved unless otherwise noted.
Click here to read our privacy and cookie policy