Build and Deploy the Extension
When the custom extension is complete, add it to the classpath and restart the RS Gateway.
Procedure
- Go to to the /mtxsdk/projects/purchase directory.
- Copy the extensions.jar file to the /opt/mtx/ext/common directory.
-
Edit the /opt/mtx/conf/extension-containers.yaml file.
Note: If this file does not exist, you must create it.
-
Add the MATRIXX Data Container (MDC) definition files to extension-containers.yaml.
For example:
extension-core: /extension-containers.yaml Extension-rest: /extension-rest-mdc.xml
- Copy the libraries or dependencies to the /opt/mtx/ext/common directory.
-
Build the project.
At the command prompt, type:
mvn clean install
- Copy the rsgwextension.jar file to the /opt/mtx/ext/rsgateway directory.
-
Enter the following command to restart RS Gateway:
sudo systemctl restart mtx_rsgateway
What to do next
Make a POST call to test the new REST service in the custom RS Gateway. Use the following URL.
http://host:port/rsgateway/