| Subveersion reorganization in progress We are currently reorganizing SVN. Thus the information below is no longer valid. Stay tuned. |
Prequisites
- Check out Cargo from SVN into a
CARGOHOMEdirectory (wherever you want on your machine). - In case your SVN client needs to go through a proxy, have a look at What if I'm behind a proxy?
- 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. 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.
Proxy settings
If you need to build cargo from behind a proxy, proceed as follows:
- if it does not exist, create a
build.propertiesfile in your home directory (C:/Documents and Settings/username on Windows), - edit the
build.propertiesfile and add the following lines: - in order to build the functional tests, you need too to create a
build.propertiesfile in thesamples/directory et add the following lines to it:
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. - If you wish to clean all build-generated files, cd to
CARGOHOMEand type "mvn clean".
Proxy settings
If you need to build cargo from behind a proxy, proceed as follows:
- edit the
.m2/settings.xmlfile from your home directory (C:/Documents and Settings/username on Windows), - comment out the <proxy> element and fill in the proxy server settings accordingly.