Prerequisites

The Rhino REST API Framework requires a Linux system with OpenJDK 11. The JAVA_HOME shell environment variable should be set to the base directory of the OpenJDK installation.

Use Rhino 3.1.0 or later.

Important Contact Metaswitch if you require a license file.

Preparing to use Rhino REST API Framework

Installation and setup is simple:

1

Download the SDK package

Uncompress the archive unified-rest-ra-sdk-2.1.0.zip

~/work$ unzip unified-rest-ra-sdk-2.1.0.zip
~/work$ cd unified-rest-ra-sdk
~/work/unified-rest-ra-sdk$ ls -la
total 52
drwxr-xr-x 6 sdkuser staff 4096 Nov 11 15:08 .
drwx------ 5 sdkuser staff 4096 Nov 11 16:14 ..
-rw-r--r-- 1 sdkuser staff   24 Nov 11 14:05 .build
-rw-r--r-- 1 sdkuser staff  101 Nov 11 14:05 .gitignore
-rw-r--r-- 1 sdkuser staff   21 Nov 11 14:05 .sdk.root
-rw-r--r-- 1 sdkuser staff  267 Nov 11 14:10 README.txt
drwxr-xr-x 5 sdkuser staff 4096 Nov 11 14:10 build
-rw-r--r-- 1 sdkuser staff  400 Nov 11 14:05 build.xml
-rw-r--r-- 1 sdkuser staff  293 Nov 11 14:05 deps.properties
drwxrwxr-x 3 sdkuser staff 4096 Nov 11 15:08 repositories
drwxr-xr-x 3 sdkuser staff 4096 Nov 11 14:10 rhino-sdk
-rw-r--r-- 1 sdkuser staff 2004 Nov 11 14:10 sdk.properties
drwxrwxr-x 2 sdkuser staff 4096 Nov 11 15:08 upstream-product-properties
Tip You may freely rename the destination directory unified-rest-ra-sdk

2

Update sdk.properties

There are a few properties in sdk.properties you should update based on your requirements

sdk.properties
# Branch name.
# Ivy details to use when publishing modules.
sdk.ivy.org=UNSET 1
sdk.ivy.publish.revision=1.0.0 2

# Component versions to use by default.
# These can be overridden inside individual modules in module.properties.
sdk.component.version=1.0 3
sdk.component.vendor=UNSET 4
  1. the org value for all Ivy artifacts created by this Rhino REST API Framework SDK install.

  2. the revision value for all Ivy artifacts created by this Rhino REST API Framework SDK install.

  3. the version portion of the SLEE Component ID for all SLEE components published by this Rhino REST API Framework SDK install.

  4. the vendor portion of the SLEE Component ID for all SLEE components published by this Rhino REST API Framework SDK install.

Example values for an ExampleCo Rhino REST API Framework project
sdk.ivy.org=exampleco
sdk.ivy.publish.revision=1.0.0

sdk.component.version=1.0
sdk.component.vendor=ExampleCo

3

Run ant for the first time

When you run ant for the first time, the Rhino REST API Framework initialises itself by creating some local configuration.

~/unified-rest-ra-sdk$ ant
Buildfile: /home/sdkuser/unified-rest-ra-sdk/build.xml

init-build-extensions:

pre-init-ivy-common:

init-ivy-common:

Determining Ivy settings.

Checking ivy-defaults.properties for ivy settings.
 ivy.cache.root=${sdk.root}/build/target/ivy-caches/offline-resolvers.cache(from ivy-defaults.properties)
 ivy.checksums=sha1                                              (from ivy-defaults.properties)
 ivy.dir=${basedir}                                              (from ivy-defaults.properties)
 ivy.libs=${target}/libs                                         (from ivy-defaults.properties)
 ivy.local.root=${sdk.root}/repositories/sdk-local               (from ivy-defaults.properties)
 ivy.offline.root=${sdk.root}/repositories/opencloud-offline-mirror(from ivy-defaults.properties)
 ivy.publication.root=${ivy.local.root}                          (from ivy-defaults.properties)
 ivy.resolve.refresh=false                                       (from ivy-defaults.properties)
 ivy.sdk-resolvers.file=offline-resolvers.xml                    (from ivy-defaults.properties)
 ivy.sdk-resolvers.path=${ivy.settings.dir}/${ivy.sdk-resolvers.file}(from ivy-defaults.properties)
 ivy.symlinks=false                                              (from ivy-defaults.properties)

Writing Ivy configuration to: /home/sdkuser/unified-rest-ra-sdk/ivy.properties

     [echo] Ivy Resolvers: /home/sdkuser/unified-rest-ra-sdk/build/ivy/offline-resolvers.xml
     [echo] Configuring Ivy with settings: /home/sdkuser/unified-rest-ra-sdk/build/ivy/ivysettings.xml
  [ivy:var] :: Apache Ivy 2.5.0-rc1 - 20180412005306 :: http://ant.apache.org/ivy/ ::
  [ivy:var] :: loading settings :: file = /home/sdkuser/unified-rest-ra-sdk/build/ivy/ivysettings.xml
[ivy:resolve] :: loading settings :: file = /home/sdkuser/unified-rest-ra-sdk/build/ivy/ivysettings.xml
     [echo] Build infrastructure lib/ directory is missing or out of date.
     [echo] Populating lib/ from ivy...
    [mkdir] Created dir: /home/sdkuser/unified-rest-ra-sdk/build/target/lib
    [touch] Creating /home/sdkuser/unified-rest-ra-sdk/build/target/lib/.lib.uptodate
...

The installation and setup is now complete.

Tip Learn more about the Sentinel Express SDK.
Previous page Next page