If you want to contribute changes to the UI to be committed up to the core ForgeRock UI project, follow the instructions in this section.
Getting A Usable Development Environment
Get IDM running:
- Checkout openidm from SVN (for example, trunk: https://svn.forgerock.org/openidm/trunk)
- Build openidm: from working copy, mvn clean install
- cd openidm-zip/target && unzip openidm-*.zip
- cd openidm && ./startup.sh
- You can now view the built UI here: http://localhost:8080/openidmui/index.html
This shows the built UI, but the resulting expanded package (ui/openidm-ui-ria-admin) is not suitable for direct development / modifications (since changes wouldn't be done within the source working copy for SVN, and thus wouldn't be able to be checked in). However, you also can't simply modify the files found under <workingcopyRoot>/openidm-ui-ria and see your changes under http://localhost:8080/openidmui/index.html without going through steps 2-5 above again. Going through this process to view each change to the static resources is unacceptably burdensome. To resolve this dilemma, follow the steps below.
Checkout working copy of ForgeRock Common UI
In order to have a complete, functioning environment for working on the UI, in addition to the OpenIDM-specific components (found under openidm-ui-ria) you will also need the common UI components. You can get these by checking out this location: https://svn.forgerock.org/commons/forgerock-ui/trunk
Once you have a this working copy, continue to the next step.
Configure reverse proxy to serve static resources out of working copy
Rather than using the copy of the UI as built and included in the OpenIDM server, you can instead use the static resources directly out of your working copy with a little bit of help from a separate reverse proxy server. These instructions provide basic detail about how to use Apache with mod_proxy on Unix-compatible systems (Linux and Mac OS X included); a similar solution should also be possible on MS Windows using IIS and virtual directories.
- Install Apache httpd, including mod_proxy
- Create a placeholder folder such as ~/openidm-ui-dev-root
- Download prepareDevEnvs-idm-ui.sh into the placeholder folder you created above
- Edit the OPENIDM= line to refer to the location of the openidm-ui-enduser working copy you've checked out
- Edit the FORGEROCKUI= line to refer to the lcoation of the forgerock common ui working copy you've checked out
- From the placeholder folder, run this script: sh prepareDevEnvs-idm-ui.sh
- Edit your apache config to both serve the content from this placeholder folder and to proxy requests for /openidm to the backend IDM process. For example:
Allow from all
ProxyPass /openidm http://localhost:8080/openidm
ProxyPassReverse /openidm http://localhost:8080/openidm
Options Indexes +FollowSymLinks MultiViews
Allow from all
This will make http://localhost:28080/ available as a UI that is directly connected to your working copies. The easiest method for development will be within the placeholder folder you created as part of step 2, above. Changes made here will be applied to the actual working copies, since they are symbolical links. Changes made within this folder will be immediately viewable through this URL. Once finished making changes, work can be checked-in from either the openidm working copy or the forgerock-ui working copy, as needed. Note - the OpenIDM backend still must be running for this site to operate (steps 1-4 from the "Get IDM running" section above).