Building with Maven 1

First time build

Icon

The Cargo build contains functional tests. Those tests are run on different containers. The first time you build Cargo it will download those container distributions which will take some time (the containers are installed into CARGOHOME/target/installs). If you want to tell Cargo to run only on some specific container, see below.

Maven 2 plugin cannot be built with Maven 1

Icon

The Maven 2 plugin located in CARGOHOME/extensions/maven2 cannot currently be built with Maven 1. The same applies for its functional tests located in CARGOHOME/samples/extensions/maven2.

Go to CARGOHOME and type "maven". This will build the full Cargo project and the distribution jars will be generated in CARGOHOME/distribution/target/maven. The functional tests will be run on the default container set (see the section on "Selecting containers" below for more on that).

If you want to build a single project, cd to that project and type "maven". Note that the build will fail if you've never built the dependent projects. Thuse it is recommended to build the full Cargo project at least once.

If you wish to clean all build-generated files, cd to CARGOHOME and type "maven cargo:clean".

Selecting containers

The default list of containers to run on depends on the subproject being built:

For the java samples, the list is in CARGOHOME/samples/java/project.properties. If you want to define a different list, simply create a build.properties file either in your home directory or in samples/java. In this file, create a cargo.containers listing the containers you wish to run on. For example if you only want to run on Tomcat 5.x you'd write:

For the Ant samples, the list is in CARGOHOME/samples/extensions/ant/project.properties. Once again if you want to define a different list, simply create a build.properties file either in your home directory or in samples/extensions/ant.

For the Maven1 samples, the list is in CARGOHOME/samples/extensions/maven/project.properties.

Tips

Type maven -o to work offline. This improves the build speed as Maven 1 does not check for updates on the remote repository for SNAPSHOTs.

Proxy settings

If you need to build cargo when behind a proxy, proceed as follows:

if it does not exist, create a build.properties file in your home directory (C:\Documents and Settingsusername on Windows),

edit the $

Unknown macro: {user.home}

/build.properties file and add the following lines:

Building with Maven 2

First time build

Icon

The Cargo build contains functional tests. Those tests are run on different containers. The first time you build Cargo it will download those container distributions which will take some time (the containers are installed into \${java.io.tmpdir}/cargoinstalls). If you want to tell Cargo to run only on some specific container, see below.

Maven 2 build not fully finished

Icon

The Cargo Maven 2 build is still not completely finished. Most subprojects have been converted to build with Maven 2 except for the following:

samples/**

extensions/intellijidea

extensions/netbeans

Go to CARGOHOME and type "mvn install". This will build the full Cargo project and the distribution jars will be generated in CARGOHOME/distribution/target.

If you wish to clean all build-generated files, cd to CARGOHOME and type "mvn clean".