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)

List of Configuration files that are to be added to a local container's configuration. Each file is specified using a <configfile> element. Cargo token replacement is applied to the files and any existing file is overwritten.

List of modules to deploy when the container is started. You specify each module using a <deployable> element.

If the project's packaging is war, ear or ejb and there is no deployer specified and the user has not defined the auto-deployable inside the <deployables> element, then the generated artifact is added automatically to the list of deployables to deploy

<files>

List of files that are to be added to a local container's configuration. Each file is specified using a <file> element.

No default

<home>

For standalone configuration this is the location where Cargo will create the configuration and for existing configuration this is where it is located

For CARGO 1.1.0 and onwards:${project.build.directory}/cargo/configurations/${containerId}
For older versions:${java.io.tmpdir}/cargo/conf

<implementation>

Full classname of a custom configuration implementation to use. In that case the custom configuration is registered with the <containerId> and <type> specified

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)

<configfile>elements

Description

Mandatory?

Default value

<file>

The configuration file, or directory, to add

No default

<todir>

The target directory, relative to configuration home, where the file should be copied

If not specified, the file will be copied to the configuration's home directory

<tofile>

The target file name to use

The original file name

<file>elements

Description

Mandatory?

Default value

<file>

The file, or directory, to add

No default

<todir>

The target directory, relative to configuration home, where the file should be copied

If not specified, the file will be copied to the configuration's home directory

<tofile>

The target file name to use

The original file name

<configfile>

Indicates if Cargo token replacement should be applied ('true') when copying. Do not use this option on a non-ascii file as it will corrupt it!

False

<overwrite>

If any existing file should be overwritten or not

True

<deployable>elements

Description

Mandatory?

Default value

<artifactId>

Maven artifact id for the module. This artifact id must match either the project's artifact id if your project generates a J2EE artifact (WAR, EAR, EJB and RAR) or it must match a specified <project>/<dependencies>/<dependency> artifact id

Defaults to the project's artifact id

<groupId>

Maven group id for the module. This group id must match either the project's group id if your project generates a J2EE artifact (WAR, EAR, EJB and RAR) or it must match a specified <project>/<dependencies>/<dependency> group id

Defaults to the project's group id

<implementation>

Deployable implementation class. Usage of this option is not recommended, please prefertypeinstead.

No default

<location>

Path location where the module can be found

Default's to the project's generated artifact location or to the specified <project>/<dependencies>/<dependency> location

<pingURL>

URL on which to ping the deployed or undeployed application (to check if deployment or undeployment is successful). If not set, the deployed or underployed application will not be pinged, hence the deployment considered as complete as soon as the target server's method returns successfully.

No default

<pingTimeout>

If <pingURL> is set, the number of milliseconds after which the ping fails the build if still not successful.

Maven type for the module. This type must match either the project's packaging if your project generates a J2EE artifact (WAR, EAR, EJB and RAR) or it must match a specified <project>/<dependencies>/<dependency> type

Defaults to the project's packaging

<properties>elements

Deployable Type

Description

Mandatory?

Default value

<context>

WAR

The context name to use when deploying the web application.

If not specified, then the default context name is computed from the name of WAR itself (without the file extension) or <project>/<build>/<finalName>

<war>

WAR

The path of the WAR being deployed.

Default's to the project's generated artifact location

<ear>

EAR

The path of the EAR being deployed.

Default's to the project's generated artifact location

<name>

EAR

The name of EAR deployable (it can be anything, there's no special rule).

If not specified, it is computed from the EAR's file name (removing the filename extension) or <project>/<build>/<finalName>

<ejb>

EJB

The path of the EJB being deployed.

Default's to the project's generated artifact location

About WAR contexts

Icon

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.

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

Defaults to the project's group id

<type>

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

Defaults to the project's packaging

<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:

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.

<zipUrlInstaller>elements

Description

Mandatory?

Default value

<url>

URL from which to download the container's ZIP or TAR.GZ file.

No default

<installDir>

Directory in which the zipUrlInstaller should download the container's ZIP or TAR.GZ file and extract it.