Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 29 Next »

Cargo provides a Maven 2 plugin.

Functional tests

Icon

The usage of Cargo for executing functional tests on a container do not need this m2 plugin. You should use directly the Cargo Java API from your JUnit/TestNG tests (as described on http://tinyurl.com/btmwa).

Installation

The Cargo m2 plugin is currently hosted on a private repository on codehaus. This repository is currently not synced to ibiblio so you'll need the following <pluginRepository> definition in your pom.xml if you want to use the Cargo plugin:

Features

Start/stop a container

Ability to start/stop a container (possibly deploying some deployables to it as it start) - cargo:start, cargo:stop. This is not the most useful use case IMO but we should support it. In this scenario Maven would be used as a convenience to start a container.

Example of m2 configuration:

Deploy to a running container

Ability to deploy to a remote container. Very useful for automating deployments with Maven (cargo:deploy).

Example of m2 configuration using a local deployer

In addition if your project is of type war or ear the generated artifact will be autoamtically added to the list of deployables to deploy. You can control the location of the artifact by using the <deployableLocation> element (it defaults to \${project.build.directory}/\${project.build.finalName}.\${project.packaging}). In addition if you want to wait for the deployment to be finished you can specify a <pingURL> (none is used by default). Here's an example:

Example of m2 configuration using a remote deployer

Generate container configuration deployment structure

Ability to create a fully working custom configuration and possibly package some deployables in it. Then delivery this configuration as an artifact (cargo:package)

TODO

Additional notes

  • A configuration specifies only the setting for a single container. If the user wants to run on several containers he must use the m2 <execution> element.
  • We'll define a default for all configuration element so that just typing "mvn cargo:start" without any config will work. Let's use Jetty as the default container for war packaging (because it's the fastest to load) and Orion as the default for EAR packaging (again because it's the fastest we have for now - We really need to implement support for OpenEJB though).
  • For the deployer, allow replacing <type> by <class> if the user wants to specify a given deployer by class name.
  • The autoDeployArtifact config property, if set to true (which will be the default) will automatially generate a <war> or <ear> element in both the <container> and <deployer> config elements.
  • No labels