Mission
Cargo is a thin wrapper around existing containers (e.g. J2EE containers). It provides different APIs to easily manipulate containers.
Cargo provides the following APIs:
- A Java to start/stop/configure Java Containers and deploy modules into them. We also offer Ant tasks, Maven 1, Maven 2, Intellij IDEA and Netbeans plugins.
- A Java API to parse/create/merge J2EE Modules
Status
Version status (click in the status column to get release notes):
Version |
Status |
Comments |
|---|---|---|
Released on 11/09/04 |
||
Released on 03/10/04 |
||
Released on 30/10/04 |
||
Released on 26/11/04 |
||
Released on 30/04/05 |
||
Released on 21/07/05 |
||
Released on 30/12/05 |
||
1.0 |
|
Q1 2006? |
| Documentation for Cargo version in development The documentation below is for Cargo 0.7 which is the version that we are currently developing (not released yet). The documentation for Cargo 0.6 (latest released version) is available here |
Architecture
| There are no images attached to this page. |
Cargo offers differents ways of using it at different levels:
- Module Java API: A Java API to parse/create/merge J2EE Modules (WAR, EAR, etc)
- Container Java API: A Java API to start/stop/configure Java Containers and deploy modules into them.
- Generic Java API: A Java API that sits on top of the Container API but allows writing generic code that works with any container. It consists mostly in a set of Factory classes to instantiate Container API objects by name.
- Build plugins
- IDE plugins
The main Container API objects are:
- The Container is the top level interface wrapping a real physical container. Cargo supports local and remote containers. A Container is composed of a Configuration.
- A Configuration tells Cargo how the container is to be configured (whether it should create a standalone setup, whether it should be based on an existing configuration, etc). A Configuration can be configured to install Deployables before the Container is started.
- You can use a Deployer to deploy Deployables dynamically (i.e. after the Container is started).
- Deployables are archives to be deployed in the Container. They are WAR, EAR, etc.
Feature list
Some top-level features (the full feature list can be found here):
- Configuration — A Configuration specifies how the container is configured (logging, security, data sources, location where to put deployables, etc).
- Container — A top level interface wrapping a real physical container
- Debugging — Explain how to perform debugging when something doesn't work in Cargo
- Deployment — How to deploy components to a container
- Extensions — Extensions are additions to the Cargo core Java API such as build tool plugins, IDE plugins, etc
- Module API — API to manipulate J2EE archives, including vendor-specific deployment descriptors
Container support
List of supported containers and the extensions that are implemented for each container (Java API, Ant tasks and Maven2/Maven3 plugin). The specified version is the version of the associated Cargo module where the feature was first made available (for example 0.2 for the Maven2 plugin means version 0.2 of the Cargo Maven 2 extension release). Click on a container's name to see a detailed list of features it supports.Container | Java API (version) | Ant tasks (version) | Maven 2 plugin (version) |
|---|---|---|---|
|
|
| |
|
|
| |
| Geronimo 3.x | 1.2.4 | 1.2.4 | 1.2.4 |
|
|
| |
|
|
| |
| Glassfish 4.x | 1.4.0 | 1.4.0 | 1.4.0 |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| Resin 3.1.x | 1.2.0 | 1.2.0 | 1.2.0 |
| Resin 4.x | 1.4.0 | 1.4.0 | 1.4.0 |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
| WebLogic 12.x | 1.2.4 | 1.2.4 | 1.2.4 |
| WebSphere 8.5.x | 1.3.0 | 1.3.0 | 1.3.0 |
| WildFly 8.x | 1.4.2 | 1.4.2 | 1.4.2 |
Some containers are tested dialy on the Codehaus Cargo Continous Integration System; for these the container's page also shows which version is tested.
Quick Start
The following examples demonstrate how to configure Resin 3.0.15 to start intarget/resin3x and deploy a WAR located in path/to/simple.war using the Java API. The default port is 8080. Please note that the container.start() and container.stop() methods wait until the container is fully started and fully stopped before continuing. Thus, for any action you are executing after, you are assured the container is completely operational.
| ANT tasks and Maven2 plugin CARGO can be used using its Java API as it is shown here. In addition to a Java API, CARGO also has ANT tasks and a Maven2 plugin:
|
Static deployment
Static deployment means that the Deployable is deployed before the container is started. Here's an example using the strongly typed Java API:
Here's the same example using the generic untyped API (which we recommend as it leads to more generic code):
Hot deployment
Hot deployment means that the Deployable is deployed after the container is started.
Functional tests
For a detailed documentation on how to use Cargo for executing functional tests on a container, directly from your Java unit test classes (JUnit, TestNG, etc), read our Functional testing page.