Versions Compared

Key

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

...

<configuration> elements

Description

Mandatory?

Default value

<configfiles>

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.

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

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.

(thumbs down)

${project.build.directory}/cargo/configurations/${containerId}

<implementation>

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

(thumbs down)

Defaults to the Cargo-provided implementation if not specified

<properties>

Values to use for various Configuration properties.


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

(thumbs down)

Default configuration properties

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

Code Block
mvn -Dcargo.servlet.port=8082 cargo:start

In addition to this, properties can also be set using the Maven 2 / Maven 3 settings.xml file. See the setting configuration options via the Maven settings.xml section for details.

<xmlReplacements>

Values to use for various XML replacements.

(thumbs down)

No default

<type>

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

(thumbs down)

standalone

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

<container> elements

Description

Mandatory?

Default value

<append>

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

(thumbs down)

false

<containerId>

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

(thumbs down)

jetty7x

<contextKey>

Container context key, which can be used for two purposes:

  1. Start, stop, configure or deploy to the same Cargo container (together with its configuration) from different Maven artifacts.
  2. Inject configuration properties via the Maven settings.xml file, as explained in the setting configuration options via the Maven 2 / Maven 3 settings.xml section.

(thumbs down)

No reusable default

The Cargo Maven 2 / Maven 3 plugin will actually generate a unique context key for each container based on the container and configuration's type and home - Which is not meant to be reused by end users.

<dependencies>

List of extra dependencies or shared dependencies that will be added to the container or applications execution classpath.

(thumbs down)

No default

<home>

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

(thumbs down)

No default

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

<implementation>

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

(thumbs down)

Defaults to the Cargo-provided implementation if not specified

<log>

Path to a file where Cargo logs are saved.

(thumbs down)

Logs to the Maven 2 / Maven 3 console if no log file is specified

<output>

Path to a file where container logs are saved.

(thumbs down)

Logs to the file specified by the <log> element or to the Maven 2 / Maven 3 console if no such file has been specified

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

No default

<timeout>

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

(thumbs down)

120000 ms (2 minutes)

<type>

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

(thumbs down)

Default value is installed unless the <containerId> has not been specified, in which case the default is to use the Jetty 8.x installed local container.

<zipUrlInstaller>

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

(thumbs down)

No default

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

<artifactInstaller>

Defines the location of a container Maven 2 / Maven 3 artifact that will be downloaded and installed.

(thumbs down)

No default

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

...

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

(thumbs up)

No default
<password>User password.

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

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>Id used in configuration files.

(thumbs down)

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

(thumbs down)

No default

Anchor
daemon
daemon

Daemon configuration

...