Installation

The Cargo Maven Plugin is found at (groupId:artifactId) org.codehaus.cargo:cargo-maven3-plugin.

This plugin has been built exclusively for Maven 3.x, and our Continous Integration system tests it on Maven version 3.5.4.

Releases

The Codehaus Cargo Maven 3 Plugin (and all other Cargo artifacts) are hosted at Maven central. As Maven is configured for Maven central by default, no additional installation or repository configuration is necessary to use the plugin.

Snapshots

There are also snapshot releases of the Codehaus Cargo Maven 3 plugin (and all other Cargo artifacts) available through the Sonatype snapshot repository. Snapshot releases are deployed automatically by the Continous Integration system.

If you want use snapshot versions of the Cargo Maven Plugin, you'll need to add this repository to your POM, settings file, or repository manager:

[...]
<pluginRepositories>
  <pluginRepository>
    <id>sonatype-snapshots</id>
    <name>Sonatype Snapshots</name>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    <releases>
      <enabled>false</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </pluginRepository>
</pluginRepositories>

<repositories>
  <repository>
    <id>sonatype-snapshots</id>
    <name>Sonatype Snapshots</name>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    <releases>
      <enabled>false</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>
</repositories>
[...]

<pluginRepository> and <repository> declarations

Note that you need to declare both the pluginRepository and repository, due to the way how the Codehaus Cargo Maven 3 plugin's container artifact loading mechanism works.

When you do not do that properly, you will be getting errors such as:

Cannot create configuration. There's no registered configuration for the parameters (container [id = [tomcat9x], type = [installed]], configuration type [standalone]). Actually there are no valid types registered for this configuration. Maybe you've made a mistake spelling it?

In case the errors persist even after adding the SNAPSHOT repositories, you can install the associated container artifact. Example (with the Codehaus Cargo Tomcat container):

mvn dependency:get -Dartifact=org.codehaus.cargo:cargo-core-container-tomcat:1.10.17-SNAPSHOT -DremoteRepositories=https://oss.sonatype.org/content/repositories/snapshots/

Then, you should decide which SNAPSHOT version to use:

  • To find out what the latest SNAPSHOT version is, you can simply look at the root POM file for Codehaus Cargo.
  • Configure the Cargo Maven Plugin by specifying the SNAPSHOT version you want.

For example, to use version 1.10.17-SNAPSHOT you would declare something similar to the following in your POM:

[...]
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.cargo</groupId>
        <artifactId>cargo-maven3-plugin</artifactId>
        <version>1.10.17-SNAPSHOT</version>
[...]
      </plugin>
[...]
    </plugins>
  </build>
[...]
Copyright 2004-2024. All rights reserved unless otherwise noted.
Click here to read our privacy and cookie policy