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).

Whenever you configure or start a container which uses a standalone configuration, Cargo will:

The reason for this behavior is reproducibility which is for example very useful for automated testing. If you wanted to keep a generated configuration you could ask Cargo to generate a standalone configuration once and then consider it an existing configuration.

Support Matrix

Java

Ant

Maven2

(tick)

(tick)

(tick)

Java API

There are different ways of using a standalone configuration:

{snippet:lang=java|id=configuration-typed-resin3x|url=http://svn.codehaus.org/cargo/core/trunk/documentation/src/main/java/org/codehaus/cargo/documentation/Snippets.java}
{snippet:lang=java|id=configuration-untyped-resin3x|url=http://svn.codehaus.org/cargo/core/trunk/documentation/src/main/java/org/codehaus/cargo/documentation/Snippets.java}

Ant Task

<cargo containerId="resin3x" [...]>
  <configuration type="standalone" home="target/resin3x"/>
  [...]
</cargo>

Maven2 Plugin

[...]
<container>
  <containerId>resin3x</containerId>
  [...]
</container>
<configuration>
  <type>standalone</type>
  <home>target/resin3x</home>
</configuration>
[...]

Note that the standalone configuration is the default for the Maven 2 plugin so specifying only the following would also work:

[...]
<container>
  <containerId>resin3x</containerId>
  [...]
</container>
[...]