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

Whenever you start a container which uses a standalone configuration, Cargo will delete the configuration directory in order to reinstall a clean standalone configuration. Thus all deployables that would have been previously deployed to this configuration will be removed. Of course, they will be deployed again if you have added them to the configuration (see Static Deployment). 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

Maven1

Maven2

IntelliJ IDEA

Netbeans

(tick)

(tick)

(tick)

(tick)

(question)

(question)

Example using the Java API

There are different ways of using a standalone configuration:

  • By directly instantiating the configuration matching your container. For example:
An error occurred: http://svn.codehaus.org/cargo/cargo/trunk/documentation/src/main/java/org/codehaus/cargo/documentation/Snippets.java. The system administrator has been notified.
  • By using the DefaultConfigurationFactory which automatically maps the right implementation for the container you're using. For example:
An error occurred: http://svn.codehaus.org/cargo/cargo/trunk/documentation/src/main/java/org/codehaus/cargo/documentation/Snippets.java. The system administrator has been notified.

Example using the Ant API

Example using the Maven 2 plugin

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

  • No labels