Versions Compared

Key

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

...

Info
titleAbout WAR contexts

Many containers have their specific files for redefining context roots (Tomcat has context.xml, JBoss has jboss-web.xml, etc.). If your WAR has such a file, the server will most probably use the context root defined in that file instead of the one you specify using the CARGO the Codehaus Cargo deployer.

Using a local deployer

...

If the deployment, undeployment or redeployment is done without any watchdog, CARGO  Codehaus Cargo will rely on the error codes return by the container's deployer to detect failures.

...

  • When you will call cargo:deploy:
    • If the deployer returns a failure, CARGO  Codehaus Cargo will log a message The deployment has failed, with the error returned by the deployer and a severity INFO.
    • It will then start the watchdog, to check if the deployable is deployed.
    • If the watchdog detects that the deployable is indeed deployed, the overall result is a BUILD SUCCESSFUL
    • If the watchdog detects that the deployable is not deployed, you then get a BUILD FAILURE
  • When you will call cargo:undeploy:
    • If the deployer returns a failure, CARGO  Codehaus Cargo will log a message The undeployment has failed, with the error returned by the deployer and a severity INFO.
    • It will then start the watchdog, to check if the deployable is not deployed.
    • If the watchdog detects that the deployable is indeed not deployed, the overall result is a BUILD SUCCESSFUL
    • If the watchdog detects that the deployable is still deployed, you then get a BUILD FAILURE

This functionality is available in the Java API, ANT Ant tasks and Maven2/Maven3 Maven 3 plugin.