How To
Archived

How do I build a maintenance release from source for OpenAM 11.0.1 and 11.0.2?

Last updated Jan 5, 2021

The purpose of this article is to provide guidance on building a maintenance release from source for OpenAM 11.0.1 and 11.0.2.


Archived

This article has been archived and is no longer maintained by ForgeRock.

Prerequisites

Warning

ForgeRock support covers the use of the official binary builds made available and downloaded from our customer portal: BackStage. We will support builds made from source providing no changes have been made to the core code of the product, the product was built from a tag that matches an official release, for example, 11.0.2 and said product was built using the ForgeRock build scripts provided as part of the source. In the event that a customer experiences an issue with a ForgeRock product built from source where ForgeRock believe the issue is as a result of the build process, ForgeRock reserves the right to ask the customer to attempt to reproduce the issue on an official ForgeRock binary build. Customers who are running custom builds or who need further clarification should contact their ForgeRock sales representative.

Required artifacts (bar one) are included in the ForgeRock protected Maven repositories. For the remaining artifact (authapi-2005-08-12.jar), you should also obtain the war file for the same version: OpenAM-11.0.x.war

Building with Oracle® JDK 1.6 is recommended, regardless of the target JVM. You will also need Apache Maven™ 3.0.x for OpenAM 11.0.1. You can use a later version of Maven for OpenAM 11.0.2; however, if you use Maven 3.3.1 or later, you will need to build with Oracle JDK 1.7.

User credentials

If you have not already done so, generate a ~/.m2/settings.xml file per How do I access the ForgeRock protected Maven repositories? It is essential that you create a valid settings.xml to access the Maven repositories needed for the build process. Failing to do this will cause your build to fail.

Building from source

Note

To clone the source code with a SSH URL, you must have created a SSH key and added it to your Bitbucket profile.

There is a missing artifact that will need resolving before starting the build. This artifact is: authapi-2005-08-12.jar - this is only needed for the openam-auth-securid auth module; however, it must be present else the build will fail.

  1. Locate the authapi-2005-08-12.jar file; this can be found and extracted from the OpenAM-11.0.x.war file.
  2. Install the authapi-2005-08-12.jar file using the following command: $ mvn install:install-file -Dfile=./authapi-2005-08-12.jar -DgroupId=external -DartifactId=authapi -Dversion=2005-08-12 -Dpackaging=jar
  3. Git clone the OpenAM sustaining releases repository: $ git clone ssh://git@stash.forgerock.org:7999/openam/openam-sustaining-external.git
  4. Find the required tag in the OpenAM sustaining releases repository; the git tag command lists all the tags in a repository: $ cd openam-sustaining-external $ git tag 10.1.0-Xpress .... sustaining/11.0.0-docs sustaining/11.0.1 sustaining/11.0.2 sustaining/11.0.2-docs ...
  5. Check out the required tag. For example, sustaining/11.0.2: $ git checkout sustaining/11.0.2
  6. Set your Maven options: $ export MAVEN_OPTS=-Xmx512m
  7. Update the pom.xml file in the checked out source to look for the ForgeRock private repository by adding the following to the <repositories> section: <repository> <id>forgerock-private-releases</id>      <name>ForgeRock Private Releases Repository</name>      <url>http://maven.forgerock.org/repo/private-releases</url>      <releases>           <enabled>true</enabled>      </releases>      <snapshots>           <enabled>false</enabled>      </snapshots> </repository>
  8. Build OpenAM using the following command: $ mvn clean install If all is successful, you'll find that everything has been built in ./openam-server/target.

See Also

FAQ: Source code in AM

How do I access the ForgeRock protected Maven repositories?

Aether ClassNotFound when building Policy Agents and OpenAM 13 from source

Building from source fails for Policy Agents 3.3.x and OpenAM 11.x with a NoGoalSpecifiedException

How do I build OpenAM 13.x from source?

Maven Settings Reference

Related Training

N/A

Related Issue Tracker IDs

OPENAM-2834 (Build issues with Maven 3.1.0)


Copyright and Trademarks Copyright © 2021 ForgeRock, all rights reserved.