Versions Compared

Key

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

...

Action

Description

start

Start a container. That task will:

Note: A container that's started with the start task will automatically shut down as soon as the parent ANT instance quits (i.e., you see a BUILD SUCCESSFUL or BUILD FAILED message). If you want to start a container and perform manual testing, see our next task run.

run

Start a container and wait for the user to press CTRL + C to stop. That task will:

stop

Stop a container.

restart

Stop and start again a container. If the container was not running before calling restart, it will simply be started.

configure

Create the configuration for a local container, without starting it. Note that the start and run actions will also install the container automatically.

daemon-start

Start a container using the Cargo Daemon.

daemon-stopStop a container using the Cargo Daemon.

deploy

Deploy a deployable to a running container.

undeploy

Undeploy a deployable from a running container.

redeploy

Undeploy and deploy again a deployable. If the deployable was not deployed before calling redeploy, it will simply be deployed.

...

Code Block
xml
xml
<taskdef resource="cargo.tasks">
  <classpath>
    <pathelement location="path/to/cargo-uberjar.jar"/>
    <pathelement location="path/to/cargo-ant-tasks.jar"/>
  </classpath>
</taskdef>

<cargo containerId="orion2x" home="c:/apps/orion-2.0.3" output="target/output.log"
    log="target/cargo.log" action="start">
  <configuration>
    <property name="cargo.servlet.port" value="8180"/>
    <property name="cargo.logging" value="high"/>
    <deployable type="war" file="path/to/my/simple.war"/>
    <deployable type="war" file="path/to/my/expandedwar/simple"/>
    <deployable type="ear" file="path/to/my/simple.ear"/>
  </configuration>
</cargo>
Info
titleLoading configuration properties from a file

It is also possible to load the configuration properties from a file - simply use the propertiesFile attribute of the configuration XML element.

Tomcat 5.x

This example gives a walk through of how to get a Cargo Ant build to work with Tomcat 5.x .

...