Versions Compared

Key

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

...

Top level configuration elements

Description

Mandatory?

Default value

<action>

Action to execute. These can be:

  • Container actions: configure, start, restartrun or stop
  • Deployer actions: deploy, undeploy or redeploy
  • Cargo Daemon actions: daemon-start or daemon-stop

(thumbs up)(thumbs up)

No default

<containerId>

Id of the container to use. Valid values can be found in the description page for each container

(thumbs up)(thumbs up)

No default

<containerType>

The container's type. Valid values are installed, embedded and remote

(thumbs down)(thumbs down)

Default value is installed

<home>

Location where the container is installed. If specified in conjunction with the <zipUrlInstaller> element, it will override the home directory defined by the installer

(thumbs down)(thumbs down)

No default

If the user has not defined any home nor <zipUrlInstaller> element then the Ant task will automatically attempt to download the container using the URL used by its tests (see the Tested On section of each container).

<zipUrlInstaller>

Defines the location of a container distribution zip that will be downloaded and installed

(thumbs down)(thumbs down)

No default

If the user has not defined any home nor <zipUrlInstaller> element then the Ant task will automatically attempt to download the container using the URL used by its tests (see the Tested On section of each container).

<timeout>

The timeout after which Cargo reports an error if the container is not started or stopped

(thumbs down)(thumbs down)

120000 ms (2 minutes)

<systemProperties>

List of <key>value</key> pairs to be passed as System properties to the container when it is started.

 


You can also use the <systemPropertiesFile> element to load system properties from a file.

(thumbs down)(thumbs down)

No default

<extraClasspath>

Additional classpath entries for the classpath that will be used to start the containers.

(thumbs down)(thumbs down)

No default

<sharedClasspath>

Classpath entries for the classpath that will be shared the applications deployed in a container. Shared application classpath deployment is only available for local containers which support shared Application Classpaths.

(thumbs down)(thumbs down)

No default

<log>

Path to a file where Cargo logs are saved

(thumbs down)(thumbs down)

Logs to the Ant console if no log file is specified

<output>

Path to a file where container logs are saved

(thumbs down)(thumbs down)

Logs to the file specified by the <log> element or to the Ant console if no such file has been specified

<append>

If true, then the file specified by <output> will not be erased across different runs

(thumbs down)(thumbs down)

false

<configuration>

Definition of a Configuration

(thumbs down)(thumbs down)

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

<daemon>

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

(thumbs down)(thumbs down)

For more information, please read: Cargo Daemon.

...

(thumbs down)

<configuration> elements

Description

Mandatory?

Default value

<type>

Configuration's type. Valid values are standalone, existing and runtime

(thumbs down)(thumbs down)

standalone

<home>

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

(thumbs up)(thumbs up)

No default

<properties>

Values to use for various Configuration properties.

 


You can also use the <propertiesFile> element to load configuration properties from a file.

(thumbs down)(thumbs down)

Default configuration properties

Note that these configuration properties can also be overriden using Java properties; for example:

Code Block
ant -Dcargo.servlet.port=8082


<deployables>

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

(thumbs down)(thumbs down)

No default

<fileConfigs>

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

(thumbs down)(thumbs down)

No default

<files>

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

(thumbs down)(thumbs down)

No default

<xmlReplacements>

Values to use for various XML replacements.

(thumbs down)(thumbs down)

No default

<users>List of users to be created in container configuration.

(thumbs down)

No default

<datasources>List of datasources to be created in container configuration.

(thumbs down)

No default

Anchor
fileconfig
fileconfig

<fileConfigs> elements

Description

Mandatory?

Default value

<file>

The configuration file or directory containing configuration files.

(thumbs up)(thumbs up)

No default

<todir>

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

(thumbs down)(thumbs down)

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

<tofile>

The target file name to use

(thumbs down)(thumbs down)

The original file name

Anchor
file
file

<file> elements

Description

Mandatory?

Default value

<file>

The file, or directory, to add

(thumbs up)(thumbs up)

No default

<todir>

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

(thumbs down)(thumbs down)

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

<tofile>

The target file name to use

(thumbs down)(thumbs down)

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!

(thumbs down)(thumbs down)

false

<overwrite>

If any existing file should be overwritten or not

(thumbs down)(thumbs down)

true

Anchor
deployable
deployable

<deployable> elements

Description

Mandatory?

Default value

<type>

Deployable type, i.e. warearejb, etc.

(thumbs up)(thumbs up)

No default

<file>

The deployable file.

(thumbs up)(thumbs up)

No default

<pingURL>

URL on which to ping the deployed or undeployed application (to check if deployment or undeployment is successful), that should return an HTTP OK response only after the deployment is complete. If not set, the deployed or undeployed application will not be pinged, hence the deployment considered as complete as soon as the target server's method returns successfully.

(thumbs down)(thumbs down)

No default

<pingTimeout>

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

(thumbs down)(thumbs down)

20000 (i.e., 20 seconds)

<properties>

User-defined properties of a deployable.

(thumbs down)(thumbs down)

No default

Anchor
prop2
prop2

<properties> elements

 Deployable Type

Description

Mandatory?

Default value

<context>

WAR

The context name to use when deploying the web application.

(thumbs down)(thumbs down)

Default's to the file name without the extension

<war>

WAR

The path of the WAR being deployed.

(thumbs down)(thumbs down)

Default's to the file name without the extension

<ear>

EAR

The path of the EAR being deployed.

(thumbs down)(thumbs down)

Default's to the file name without the extension

<name>

EAR

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

(thumbs down)(thumbs down)

Default's to the file name without the extension

<ejb>

EJB

The path of the EJB being deployed.

(thumbs down)(thumbs down)

Default's to the file name without the extension

...

<zipUrlInstaller> elements

Description

Mandatory?

Default value

<url>

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

(thumbs up)(thumbs up)

No default

<downloadDir>

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

(thumbs down)(thumbs down)

${java.io.tmpdir}/cargo/installs

<extractDir>

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

(thumbs down)(thumbs down)

${project.build.directory}/cargo/installs

<proxy>

Proxy server settings, if required.

(thumbs down)(thumbs down)

No default

Anchor
proxy
proxy

<proxy> elements (under the zipUrlInstaller element)

Description

Mandatory?

Default value

<host>

Proxy host name or IP address.

(thumbs up)(thumbs up)

No default

<port>

Proxy port.

(thumbs down)(thumbs down)

Very probably 80

<user>

User name to connect to the proxy server.

(thumbs down)(thumbs down)

No default

<password>

Password to connect to the proxy server.

(thumbs down)(thumbs down)

No default

Anchor
user
user

<user> elementsDescriptionMandatory?Default value
<name>User name.

(thumbs up)(thumbs up)

No default
<password>User password.

(thumbs down)(thumbs down)

No default
<roles>

List of roles which should be assigned to user.

Example of roles configuration:

Code Block
languagexml
<roles>
    <role>cargo</role>
</roles>
(thumbs down)


(thumbs down)

No default

Anchor
datasource
datasource

<datasource> elementsDescriptionMandatory?Default value
<jndiName>JNDI name where to find this DataSource.

(thumbs up)

No default
<connectionType>Type of this DataSource, for example: javax.sql.XADataSource

(thumbs down)

No default
<transactionSupport>Transaction support of the DataSource, for example: XA_TRANSACTION

(thumbs down)

No default
<driverClass>The class name of the driver, for example: org.hsqldb.jdbcDriver

(thumbs down)

No default
<url>DataSource connection URL.

(thumbs down)

No default
<username>DataSource username.

(thumbs down)

No default
<password>DataSource password.

(thumbs down)

Empty string
<id>Identifier used in configuration files.

(thumbs down)

No default
<connectionProperties>Extra properties passed to the DataSource.

(thumbs down)

No default

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)(thumbs down)

No default

<properties>

A list of properties used to configure the Cargo Daemon.

(thumbs up)(thumbs up)

No default


<properties> elements

Description

Mandatory?

Default value

<cargo.daemon.url>

URL to connect with the daemon.

(thumbs up)(thumbs up)

No default

<cargo.daemon.handleid>

The handle id to register this container with.

(thumbs up)(thumbs up)

No default

<cargo.daemon.autostart>

When set to true, the dameon will automatically restart the container if the daemon notices it is stopped.

(thumbs down)(thumbs down)

false

<cargo.daemon.username>Username used when authenticating against the daemon host(thumbs down)(thumbs down)admin
<cargo.daemon.password>Password used when authenticating against the daemon host(thumbs down)"" (empty String)(thumbs down)Empty string