Skip to main content

Exporting Web Red App

Creating validation-ready jar

Web Red App can be packaged into a validation-ready, signed jar using Sabre Concierge Tool.

To do so use the

ngv export --keystore=$keystore --keypass=$keypass --alias=$alias --storepass=$storepass

command

svs and export directories will be created in the build/ folder, also SVS-ready validation bundle - bunle_name_version.zip - will be created in the build folder.

Source files (web-src) will be copied into the build/svs directory and redapp.xml, MANIFEST.mf and plugin.xml files will be created based on data existing in manifest.json and package.json files (provided during ngv init).

Then a .jar file will be created with all of the above, it will be signed using the data provided as command execution parameters and copied into the build/export along with the bundle.properties file and the certificate exported from the provided keystore.

java, jar and jarsign commands have to be available and added to the PATH variable.

Mind the double dashes (--) before argument name.

Example:

ngv export --keystore=/c/Developer/Workspace/myKeystore --storepass=abc34 --keypass=abc34 --alias=myFirstKey

Export needs proper content of manifest.json. If a Red App has been created using ngv init, then all the necessary fields should exist. Otherwise all of them need to be added manually. Sample manifest.json with all the obligatory fields:

{
  "redAppId": "sabre-id-redapp-sample",
  "bundleSymbolicName": "com.sabre.sample",
  "bundleName": "Sabre Sample",
  "name": "com-sabre-sample-web-module",
  "contactDetails": {
    "author": "Sabre",
    "email": "sabre@sabre.com",
    "phoneNumber": "555555555",
    "company": "Sabre",
    "contactName": "Sabre",
    "website": "sabre.com"
  }
}

And a corresponding package.json:

{
  "name": "com-sabre-sample-web-module-src",
  "version": "1.0.0",
  "description": "NGV module",
  "author": "Sabre",
  "contributors": [],
  "private": true,
  "license": "LicenseRef-LICENSE",
  "dependencies": {},
  "devDependencies": {},
  "optionalDependencies": {},
  "ngv": {
    "buildDependencies": {
      "sabre-ngv-app": "*",
      "sabre-ngv-core": "*"
    }
  }
}

manifest.json can also contain authorization information that will be transformed into redapp.xml entries during ngv export.

{
  "redAppId": "sabre-id-redapp-sample",
  "bundleSymbolicName": "com.sabre.sample",
  "bundleName": "Sabre Sample",
  "name": "com-sabre-sample-web-module",
  "contactDetails": {
    "author": "Sabre",
    "email": "sabre@sabre.com",
    "phoneNumber": "555555555",
    "company": "Sabre",
    "contactName": "Sabre",
    "website": "sabre.com"
  },
  "authorizations": [
    {
		  "name": "com.sabre.edge.cf.host.Communication",
		  "threshold": 10,
		  "metric": "tpm"
	  },
	  {
		  "name": "com.sabre.edge.cf.rest2sg.Rest2Sg",
		  "actions": [{
			  "name":"/v4/lists/utilities/geocode/locations",
			  "threshold":1,
			  "metric":"tps"
		  }]
	  }]
}