How To

How do I quickly test IG/OpenIG configurations (All versions) with Jetty?

Last updated Jul 9, 2018

The purpose of this article is to provide some hints around getting IG/OpenIG up and running quickly using the Jetty® web container and the command line.


2 readers recommend this article

Using jetty-runner

Prerequisites

  • Java® 7 or Java 8: An installation of Java that matches the supported version of IG/OpenIG you want to run; see the release notes of the version you are working with.
  • jetty-runner: A copy of the jetty-runner.jar that matches the supported version of IG/OpenIG you want to run; see the release notes of the version you are working with.
  • openig.war: A copy of the IG/OpenIG war file that you want to use with jetty-runner. You can download the war file from BackStage.
  • IG/OpenIG base configuration directory: An appropriate directory structure that holds the IG/OpenIG configuration files.

Running

  • Enter the following command to start up the Jetty container to host IG/OpenIG:
    $ java -Dopenig.base=[ig-configuration-directory] -jar [jetty-runner.jar] --path / [openig.war]
    replacing [ig-configuration-directory], [jetty-runner.jar] and [openig.war] with appropriate values.

Testing

  • Browse to the appropriate IG/OpenIG URL to match the configuration used when starting up IG/OpenIG.
Note

The default http listening port used by Jetty is 8080; use the jetty-runner --port parameter to change this as required, for example: --path / --port 7070 [openig.war]

Using the IG/OpenIG source code and Maven

Caution

You must authenticate to the ForgeRock protected Maven repositories using your BackStage credentials in order to build IG/OpenIG releases from source. See How do I access the ForgeRock protected Maven repositories? for further information. Source code for IG 5 and later is only available on request. See FAQ: Source code in IG/OpenIG (Q. How do I request access to the source code for IG 5 and later?) for further information.

Prerequisites

  • Java 7 or Java 8: An installation of Java that matches the supported version of IG/OpenIG you want to run; see the release notes of the version you are working with.
  • Apache Maven™ 3.x: An installation of at least Maven v3.3.9.
  • IG/OpenIG source code: A clone of the IG/OpenIG source code. See FAQ: Source code in IG/OpenIG for further information on obtaining the source code.
  • IG/OpenIG base configuration directory: An appropriate directory structure that holds the IG/OpenIG configuration files.

Building

  • Change into the directory where you have cloned a copy of the IG/OpenIG source code.
  • Checkout appropriate version of IG/OpenIG, for example, if you want to run a copy of IG 5:
    $ git checkout 5.0
  • Build the IG/OpenIG project to generate the war file:
    $ mvn clean install

See How do I build AM, DS, IDM and IG (All versions) from source? for further information on building IG.

Running

  • Enter the following to start the Maven Jetty plugin from the source directory where you have successfully built a copy of the IG/OpenIG version you want to run:
    $ mvn -pl openig-war jetty:run -Dopenig.base=[ig-configuration-directory]
    replacing [ig-configuration-directory] with an appropriate value.

Testing

  • Browse to the appropriate IG/OpenIG URL to match the configuration used when starting up IG/OpenIG.
Note

The default http listening port used by Jetty is 8080; use the java -Djetty.port parameter to change this as required, for example: jetty:run -Djetty.port=7070

See Also

Gateway Guide › Configuration Directories and Files

IG 6 Release Notes

IG 5.5 Release Notes

IG 5 Release Notes

OpenIG 4.5 Release Notes

OpenIG 4 Release Notes

jetty-runner documentation

jetty-runner downloads

Apache Maven downloads



Copyright and TrademarksCopyright © 2018 ForgeRock, all rights reserved.
Loading...