Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Definition

Configures your container in a specific directory

Explanation

The standalone configuration allows configuring your container so that it is setup to start in a directory you choose (see the configuration page for more general explanations).

You use the standalone configuration by creating an instance of the StandaloneConfiguration class. The constructors of StandaloneConfiguration are:

With the first constructor you specify a configuration id (any id will do) and Cargo will setup your container to start in a configurationId directory in your tmp directory (pointed to by the java.io.tmpdir System property). The second constructor allows to specify exactly where you wish the configuration directory to be.

Note that if you don't specify any configuration, Cargo will use a standalone configuration by default with a configurationId named after your container type (e.g. "tomcat5x" for a Tomcat 5.x container).

Example using the Java API

Start a Tomcat 5.x container and set it up to start in a target/tomcat5x directory:

Example using the Ant API

Start a Tomcat 5.x container and set it up to start in a target/tomcat5x directory:

Note: The Ant task is still using the old workingDir attribute that was there in Cargo 0.2 (which has been deprecated for the Java API). In the future it is planned to be removed and replaced by a nested <configuration> (or <standaloneConfiguration>) element.

  • No labels