Prequisites
- Check out Cargo from SVN into a
CARGOHOMEdirectory (wherever you want on your machine) - Install Maven 1 or Maven 2. Verify your installation works by typing "
maven --version" (for Maven 1) or "mvn --version" (for Maven 2) at a command prompt.
Building with Maven 1
| First time build 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 |
| Maven 2 plugin cannot be built with Maven 1 The Maven 2 plugin located in |
- Go to
CARGOHOMEand type "maven". This will build the full Cargo project and the distribution jars will be generated inCARGOHOME/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
CARGOHOMEand 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 abuild.propertiesfile either in your home directory or insamples/java. In this file, create acargo.containerslisting 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 abuild.propertiesfile either in your home directory or insamples/extensions/ant. - For the Maven1 samples, the list is in
CARGOHOME/samples/extensions/maven/project.properties.
Tips
- Type
maven -oto work offline. This improves the build speed as Maven 1 does not check for updates on the remote repository for SNAPSHOTs.
Building with Maven 2
| First time build 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 |
| Maven 2 build not fully finished The Cargo Maven 2 build is still not completely finished. Most subprojects have been converted to build with Maven 2 except for the following:
|
- Go to
CARGOHOMEand type "mvn install". This will build the full Cargo project and the distribution jars will be generated inCARGOHOME/distribution/target.