# Codehaus Cargo : Installation

Created by Former user, last modified by S. Ali Tokmen on Nov 28, 2025

### Java API

Cargo offers primarily a Java API. It is meant to be embedded in your application. You'll need Java SE version 8 or greater.

You have two choices to pick from the Downloads page:

- the `cargo-core-api-*` jars and the container implementations you wish to use (`cargo-core-container-*` jars)
- or the `cargo-core-uberjar` jar which aggregates all the required jars and their core dependencies (such as the various J2EE, Java EE and Jakarta EE specifications, JNI, etc.)

Cargo's only base dependency not packed in the uberjar is commons discovery 0.5, which itself depends on commons logging 1.1.1 (though our builds always use the latest version).

In addition, some specific containers and features require the following:

Container or feature | Additional dependencies
--- | ---
Avoiding XML parser issues | Convenience JAR with DTDs that are used by some Cargo components which have licenses incompatible with the rest of Cargo
Installers | Commons compress 1.28.0 or greater, which itself depends on commons lang 3.18.0 (though our builds always use the latest version) Tukaani XZ 1.11 or greater (for 7Z support)
JOnAS standalone containers | Apache Ant (including the Ant Launcher), the version seems not to matter too much
Parsing of container-specific deployables (JBoss, Orion, Tomcat, etc.) Merging WAR files | jaxen 2.0.0 or greater JDOM 2.0.6.1 or greater
WildFly remote deployer, Cargo Daemon Java client | JSON.simple 1.1.1 or greater
WildFly Swarm | Jackson core 2.20.1 or greater Jackson YAML dataformat 2.20.1 or greater, which itself depends on SnakeYAML 2.4 or greater

### Apache Ant

If you want use the Cargo Ant tasks, add the following JARs to Ant's classpath:

- The same jars as for the Java API (i.e., either the API JARs + the container(s) or the uberjar)
- The `cargo-ant` JAR, containing the `<taskdef>` definition (see the Ant support page)

### Apache Maven 3

Maven 3 will automatically download all required dependencies: see the Maven 3 Plugin page. As a result, no installation is required for Maven 3.

If you are creating a Java applications which use the Cargo via API, you need to add as dependency either the artifact for your favorite container or the uberjar (which contains all containers). See below examples:

Example for adding the Codehaus Cargo uberjar as dependency

    <dependency>
      <groupId>org.codehaus.cargo</groupId>
      <artifactId>cargo-core-uberjar</artifactId>
      <version>${cargo.version}</version>
    </dependency>

or, with the Tomcat container (as an example):

Example for adding the Codehaus Cargo Tomcat container as dependency

    <dependency>
      <groupId>org.codehaus.cargo</groupId>
      <artifactId>cargo-core-container-tomcat</artifactId>
      <version>${cargo.version}</version>
    </dependency>