Building Cayenne

Prerequisites

  • Download Maven2.
  • Check out the repository trunk (or another appropriate branch). eg:
svn co https://svn.apache.org/repos/asf/cayenne/main/trunk/ cayenne
cd cayenne/

All examples below assume the user is in "cayenne" folder.

Building with Maven

Depending on what you want to do, there are various flavors of the builds discussed below.

Building the framework and installing it to the local repository (the most common flavor) :

mvn clean install

In order to skip the unit tests (to speed up the build process or because some tests are failing), add "-Dmaven.test.skip=true" to any build flavor:

mvn clean install -Dmaven.test.skip=true

For the build to produce a release-like assembly, activate "assembly" profile. Additionally activate a profile specific for the target platform of a given assembly (otherwise assembly profile won't produce anything).

Source assembly:

mvn clean install -Passembly,src

Cross-platform assembly:

mvn clean install -Passembly,generic

Windows assembly:

mvn clean install -Passembly,windows

Mac OS X assembly:

mvn clean install -Passembly,mac

Multiple assemblies built at once:

mvn clean install -Passembly,src,generic,mac

To pull the latest docs from Confluence Wiki, a build must be done with "wiki-docs" profile activated. Note that unlike the examples above, you will need to change to the doc module directory:

# cd docs/doc
# mvn -P wiki-docs clean install -Dconfluence.userName=username -Dconfluence.password=password
# svn ci -m "docs updated"

If you have a custom keystore under ~/.keystore, you will need to explicitly specify a JVM shared keystore to avoid build errors related to HTTPS access:

mvn -P wiki-docs clean install -Dconfluence.userName=username -Dconfluence.password=password \
  -Djavax.net.ssl.trustStore=<JAVA_HOME>/lib/security/cacerts