Standalone Local Configuration
Definition
Configures your container in a specific directoryExplanation
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:
- Delete the configuration directory
- Create a new configuration in that directory, with all configuration properties (including data sources and resources) and XML replacements
- Copy all configuration files
- Perform a local deployment of all deployables
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.
Java API
There are different ways of using a standalone configuration:
- By directly instantiating the configuration matching your container. For example:
Unknown macro: {snippet}
- By using the
DefaultConfigurationFactory
which automatically maps the right implementation for the container you're using. For example:
Unknown macro: {snippet}
Ant Task
<cargo containerId="resin3x" [...]> <configuration type="standalone" home="target/resin3x"/> [...] </cargo>
Maven 3Â 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 plugin so specifying only the following would also work:
[...] <container> <containerId>resin3x</containerId> [...] </container> [...]