Versions Compared

Key

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

...

Top level configuration elements

Description

Mandatory?

Default value

<configuration>

Definition of a Configuration

(thumbs down)

Defaults to a standalone configuration if the container is of type local and a runtime one if it's of type remote

<container>

Definition of a Container

(thumbs down)

Defaults to a Jetty 7.x installed container if not specified

<deployer>

Definition of a Deployer

(thumbs down)

Defaults to a deployer matching the container's type if none is specified (installed local deployer for an installed container, remote deployer for a remote container and embedded local deployer for an embedded container)

<deployables>

A list of deployables that are going to be deployed in the container when it is started or when cargo:deploycargo:undeploy is called.

(thumbs down)

If the project's packaging is warear or ejb, the generated artifact is added automatically to the list of deployables to deploy. If you wish the generated artifact not to be added to the deployables list, just add an empty <deployer/> element.

<daemonProperties>

A list of properties that are <daemon>

Additional configuration that is used when deploying with the Cargo Daemon.

(thumbs down)

Cargo Daemon properties. For more information, please read: Cargo Daemon.

<skip>

Set this to true to bypass cargo execution

(thumbs down)

Defaults to false

<wait>

Decides if Cargo should wait after the container is started or not. If using Cargo for integration tests, set it to false, otherwise Cargo will start the container and show the following message: Press Ctrl-C to stop the container...

Important: This parameter has been deprecated and will be removed soon. If you want to do manual testing, please use the cargo:run MOJO.

(thumbs down)

false

...

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 deployer.


Anchor
daemonpropertiesdaemonproperties

<daemonProperties> elements

Description

Mandatory?

Default value

<cargo.daemon.url>

URL to connect with the daemon.

(thumbs up)

No default

<cargo.daemon.handleid>

The handle id to register this container with.

(thumbs up)

No default

<cargo.daemon.autostart>

Tells the daemon to autostart this container if it is stopped.

(thumbs down)

false

Anchor
dependency
dependency

<dependency> elements

Description

Mandatory?

Default value

<artifactId>

Maven's artifact id. This artifact id must match a specified <project>/<dependencies>/<dependency> artifact id

(thumbs down)

Defaults to the project's artifact id

<groupId>

Maven's group id. This group id must match a specified <project>/<dependencies>/<dependency> group id

(thumbs down)

Defaults to the project's group id

<type>

Maven's type. This type must match a specified <project>/<dependencies>/<dependency> type

(thumbs down)

Defaults to the project's packaging

<classpath>

Target classpath, either extra (default) or shared. Shared application classpath deployment is only available for local containers which support shared Application Classpaths.

(thumbs down)

extra (container classpath)

<location>

The path of a folder or a jar file you wish to add to deployable classpath. This element can be used to explicitly add entries to the classpath. For example:

Code Block
<dependency>
   <location>src/main/resources/conf</location>
</dependency>

(thumbs down)

If the groupId and artifactId match those of the project then the deployable is the artifact generated by the project. Otherwise the location is the location of the dependency in your local respository.

...

Anchor
settingsXML
settingsXML

 

Daemon configuration

Anchor
daemon
daemon

<daemon> elements

Description

Mandatory?

Default value

<classpaths>

A list of <classpath>myclasspath</classpath> items, that will be added by the JVM launcher when starting a container.

(thumbs down)

No default

<properties>

A list of properties used to configure the Cargo Daemon.

(thumbs up)

No default

<properties> elements

Description

Mandatory?

Default value

<cargo.daemon.url>

URL to connect with the daemon.

(thumbs up)

No default

<cargo.daemon.handleid>

The handle id to register this container with.

(thumbs up)

No default

<cargo.daemon.autostart>

Tells the daemon to autostart this container if it is stopped.

(thumbs down)

false

Setting configuration options via the Maven settings.xml

...