Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

Prequisites

  • Check out Cargo from SVN into a CARGOHOME directory (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

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 from behind a proxy, proceed as follows:

  • if it does not exist, create a build.properties file in your home directory (C:/Documents and Settings/username on Windows),
  • edit the build.properties file and add the following lines:
  • in order to build the functional tests, you need too to create a build.properties file in the samples/ directory et add the following lines to it:

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}/cargo/installs). 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".

Proxy settings

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

  • edit the .m2/settings.xml file from your home directory (C:/Documents and Settings/username on Windows),
  • comment out the <proxy> element and fill in the proxy server settings accordingly.
  • No labels