Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.



Start a container that is not already running


This feature is only available for local containers


Starting Resin 3.x with no deployable:

Code Block

InstalledLocalContainer container = new Resin3xInstalledLocalContainer(
  new Resin3xStandaloneLocalConfiguration("target/resin3x"));



Starting Resin 3.x with no deployable:

Code Block

<cargo containerId="resin3x" home="c:/apps/resin-3.0.15" action="start"/>

Example using the Maven2/Maven3 plugin

For the Maven2/Maven plugin, please read: Starting and stopping a container.

Other tips

Letting the started container outlive CARGO's process

By default, the container started by CARGO is linked to CARGO's process; which means that once the Java process that has started the container is finished (be it via Java API, ANT or the Maven2/Maven3 plugin) the started container will also be killed.

In some cases, mostly if you want to use CARGO as a "launcher script", you need the started container to "outlive" CARGO's process, i.e. that the started container keeps running even after CARGO itself has terminated. This can be achieved by simply setting the property GeneralPropertySet.SPAWN_PROCESS (or, in the ANT tasks or Maven2/Maven3 plugin, the cargo.process.spawn property) to true.