...
These are the various XML configuration elements that you can use to configure the Cargo Maven2 plugin. Make sure you also check the use cases which show how to use them.
Top level configuration elements | Description | Mandatory? | Default value | |||
|---|---|---|---|---|---|---|
Definition of a Configuration |
| Defaults to a standalone configuration if the container is of type local and a runtime one if it's of type remote | ||||
Definition of a Container |
| Defaults to a Jetty 7.x installed container if not specified | ||||
Definition of a Deployer |
| 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) | ||||
A list of deployables that are going to be deployed in the container when it is started or when |
| If the project's packaging is | ||||
Additional configuration that is used when deploying with the Cargo Daemon. |
| For more information, please read: Cargo Daemon. | ||||
| Set this to |
| Defaults to |
| Decides if Cargo should wait after the container is started or not. If using Cargo for integration tests, set it to
|
|
| Info | ||
|---|---|---|
| ||
Instead of tweaking your Maven project POM with the different values for the
|
| Anchor | ||
|---|---|---|
|
| Description | Mandatory? | Default value | ||
|---|---|---|---|---|---|
List of Configuration files that are to be added to a local container's configuration. Each file is specified using a |
| No default | |||
List of files that are to be added to a local container's configuration. Each file is specified using a |
| No default | |||
| For standalone configuration this is the location where Cargo will create the configuration and for existing configuration this is where it is located |
|
| ||
| Full classname of a custom configuration implementation to use. In that case the custom configuration is registered with the |
| Defaults to the Cargo-provided implementation if not specified | ||
Values to use for various Configuration properties.
You can also use the |
| Default configuration properties
In addition to this, properties can also be set using the Maven2 | |||
| Configuration's type. Valid values are |
|
|
...
| Description | Mandatory? | Default value |
|---|---|---|---|
| If |
|
|
| Id of the container to use. Valid values can be found in the description page for each container |
|
|
List of extra dependencies or shared dependencies that will be added to the container or applications execution classpath. |
| No default | |
| Location where the container is installed. If specified in conjunction with the |
| No default, user must define either a If the user has not defined any |
| Full classname of a custom container implementation to use. In that case, the custom container is registered with the |
| Defaults to the Cargo-provided implementation if not specified |
| Path to a file where Cargo logs are saved |
| Logs to the Maven console if no log file is specified |
| Path to a file where container logs are saved |
| Logs to the file specified by the |
List of
You can also use the |
| No default | |
The timeout after which Cargo reports an error if the container is not started or stopped |
|
| |
| The container's type. Valid values are |
| Default value is |
Defines the location of a container distribution zip that will be downloaded and installed |
| No default, user must define either a If the user has not defined any | |
Defines the location of a container Maven artifact that will be downloaded and installed |
| No default, user must define either a If the user has not defined any |
| Anchor | ||
|---|---|---|
|
| Description | Mandatory? | Default value |
|---|---|---|---|
| Deployer implementation class. Usage of this option is not recommended, please prefer |
| No default |
| The deployer's type. |
| 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) |
...
| Description | Mandatory? | Default value |
|---|---|---|---|
| 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 |
| Defaults to the project's artifact id |
| 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 |
| Defaults to the project's group id |
| Deployable implementation class. Usage of this option is not recommended, please prefer |
| No default |
| Path location where the module can be found |
| Default's to the project's generated artifact location or to the specified |
| 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. |
| No default |
| If |
|
|
User-defined properties of a deployable. |
| No default | |
| 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 |
| Defaults to the project's packaging |
...
| Description | Mandatory? | Default value |
|---|---|---|---|
| URL from which to download the container's ZIP or TAR.GZ file. |
| No default |
| Directory in which the |
|
|
| Directory in which the |
|
|
Proxy server settings, if required. |
| No default |
...
| Description | Mandatory? | Default value |
|---|---|---|---|
| Group id. |
| No default |
| Artifact id. |
| No default |
| Version. |
| No default |
| Artifact type. |
|
|
| Classifier. |
| No default |
| Directory in which the |
|
|
| Anchor | ||
|---|---|---|
|
Daemon configuration
Anchor
| Info | ||
|---|---|---|
| ||
For the Maven2/Maven3 plugin, the "daemonized server" is actually a local container with a hostname that points to a remote machine. This implies that:
When you call
|
| Description | Mandatory? | Default value |
|---|---|---|---|
| A list of |
| No default |
| A list of properties used to configure the Cargo Daemon. |
| No default |
| Description | Mandatory? | Default value |
|---|---|---|---|
| URL to connect with the daemon. |
| No default |
| The handle id to register this container with. |
| No default |
| When set to |
|
|
<cargo.daemon.username> | Username used when authenticating against the daemon host | admin | |
<cargo.daemon.password> | Password used when authenticating against the daemon host | "" (empty String) |
| Anchor | ||
|---|---|---|
|
Setting configuration options via the Maven settings.xml
...