2011/08/05 - Jakarta Cactus has been retired.

For more information, please explore the Attic.

Resin[2x|3x] Tasks

The resin2x and resin3x tasks start/stop Resin 2.x/3.x instances. Both tasks support the following parameters.

Parameters

Name Description Required
dir The installation directory of the Resin server Yes
action The action to perform. Valid values are "start" and "stop" to respectively start and stop the container. Yes
testurl A container URL to poll to test if the container has been started/stopped. If specified the task waits until the container has completely started/stopped. No
warfile The WAR file to deploy No. One of warfile and earfile.
earfile The EAR file to deploy No. One of warfile and earfile.
resinconf The configuration file to use instead of the default one No
port The TCP port that the container should listen to No, default is 8080
tmpdir The directory to which the container will be installed for the tests. No (by default the system temporary directory is used)
output Name of a file to write the output of the container to. If not specified, the standard output will be used No
append Whether output should be appended to or overwrite an existing file. No, default is false

Examples

Start a Resin 3.x instance, wait for it to be started and stop it, waiting for it to be completely stopped:

<parallel>
  <resin3x dir="${cactus.home.resin3x}" action="start"/>
  <sequential>
    <waitfor>
      <http url="http://localhost:${cactus.port}"/>
    </waitfor>
    <resin3x dir="${cactus.home.resin3x}" action="stop"/>
    <waitfor>
      <not>
        <http url="http://localhost:${cactus.port}"/>
      </not>
    </waitfor>
  </sequential>
</parallel>

This is equivalent to the following (notice the use of the 'testurl' attribute:

<resin3x dir="${cactus.home.resin3x}" action="start"
    testurl="http://localhost:${cactus.port}"/>
<resin3x dir="${cactus.home.resin3x}" action="stop"
    testurl="http://localhost:${cactus.port}"/>