This page last changed on Apr 29, 2011 by alitokmen.

Installation

The Cargo Maven Plugin is found at (groupId:artifactId) org.codehaus.cargo:cargo-maven2-plugin. This plugin works with both Maven 2.x and 3.0.

Releases

The Cargo Maven Plugin (and all other Cargo artifacts) are hosted at the Codehaus Maven repository, which is synced to 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 Cargo Maven plugin (and all other Cargo artifacts) available through the Codehaus snapshot repository. Snapshot releases are deployed automatically by the CARGO-deploy plan on the Codehaus Continuous Integration Server.

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>codehaus-snapshots</id>
    <name>Codehaus Snapshots</name>
    <url>http://nexus.codehaus.org/snapshots/</url>
    <releases>
      <enabled>false</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </pluginRepository>
</pluginRepositories>

<repositories>
  <repository>
    <id>codehaus-snapshots</id>
    <name>Codehaus Snapshots</name>
    <url>http://nexus.codehaus.org/snapshots/</url>
    <releases>
      <enabled>false</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>
</repositories>
[...]

(If you're using the Cargo Maven Plugin with Maven 3.0, you only need to declare the pluginRepository. However, Maven 2.x requires both the pluginRepository and the repository declaration.)

Then configure the Cargo Maven Plugin by specifying a SNAPSHOT version. For example, to use version 1.1.0-SNAPSHOT you would declare something similar to the following in your POM:

[...]
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.cargo</groupId>
        <artifactId>cargo-maven2-plugin</artifactId>
        <version>1.1.0-SNAPSHOT</version>
[...]
      </plugin>
[...]
    </plugins>
  </build>
[...]

One important thing to understand is that this snapshot repository is managed by Nexus and is in fact a group of several repositories (some proxied). Browsing the repository via the url would therefore not display all files actually available, but only those cached in the Nexus instance. However, Maven will always be able to retrieve the latest snapshot release (as it reads the Maven metadata provided).

Document generated by Confluence on May 05, 2011 19:53