Setting up your Environment
The environment you need to set up is dependent upon the version of OpenAM that you want to build. To build OpenAM you will need the following installed on the machine you're going to build on;
|OpenAM||Java JDK Version||Maven||Git|
|Latest/OpenAM 13.0.0||1.7 or above||> 3.1.0||> 1.7.6|
|OpenAM 12.0.0||1.6 or above||< 3.3.1||> 1.7.6|
|OpenAM 11.0.0||1.6 or 1.7||3.0.5||> 1.7.6|
You should also set the following environment variables for the majority of versions;
JAVA_HOME - set to the directory in which your SDK is installed
M2_HOME - set to the directory in which maven in installed.
M2 - set to the bin directory in which the maven executable is found.
MAVEN_OPTS - set to '-Xmx1g -XX:MaxPermSize=512m'
Get the Code
To get the latest source, you will need to login to the Stash server using your ForgeRock Backstage Username (not email address!) and Password.
ForgeRock's Stash server is here;
If you want to work with the code in a read only manner, i.e. you just want to build code, you don't want to modify the code and contribute your changes back to the project, then you can clone the above repository directly;
Git will ask you for your password. Provide your Backstage password and git will then clone the repository to your machine.
Download the dependencies for Maven
One of the primary benefits of Maven is that it automatically resolves third-party libraries, eliminating the need to download the dependencies separately. The switch to Maven occurred on September 5, 2012 (r3127).
Building the releases
When building the releases using the release profile additional modules - such as the openam-securid Maven module for SecurID authentication - are built. The libraries necessary to build the SecurID authentication module are not publicly available, hence if you do not have access to the necessary libraries, you should disable the openam-securid module under the openam-authentication module, by simply commenting the module out in openam-authentication/pom.xml. Additionally, you may need to remove the openam-auth-securid dependency from the openam-server-only/pom.xml to ensure that the WAR can be built correctly.
In case you do have access to the SecurID libraries and you want to build OpenAM with the SecurID module, then you should run the following Maven command to install the artifacts to your local Maven repository:
Build the Code - latest.
This can take a significant amount of time as maven has to download all the libraries and artifacts that the build is dependent on. Subsequent builds will be much quicker.
Build an Enterprise Release
The enterprise releases are marked in the openam repository as tags. The process is similar to building the master branch ( the latest code ) but you will need to create a branch from the tag first. This is done using the -b option when doing the checkout as can be seen below;
Build OpenAM 13
To build OpenAM 13 do the following;
Build OpenAM 12
To build OpenAM 12 you will need to;
Build OpenAM 11
You'll find everything that has been built in
The first Maven build will likely take longer than all subsequent builds to accommodate the lengthy dependency artifact chain.