Migrate from JAR-based modules to Git-based modules
Before ApiOmat version 2.1.0 there was only the possibility to create JAR-based Native Modules. Since then the possibility to create Git-based Native Modules was added.
These Git-based modules have some advantages:
-
They're easier to maintain
-
As with every Git repository it's much easier to work on it with multiple developers at the same time
-
The performance when working with references is higher
So if you already have some existing modules that are currently still JAR-based you might want to change them to the new format.
To change/update the module from JAR to Git there are a few steps to follow:
1) Download the current version of the JAR-based Native Module with the Ant script (build.xml) or cURL
curl -X GET %URL%/yambas/rest/modules/%YOUR_MODULENAME%/sdk -u %AUTH% > %YOUR_MODULENAME%.zip
2) Delete the chosen Native Module in yambas using the ApiOmat Dashboard or cURL
curl -X DELETE %URL%/yambas/rest/modules/%YOUR_MODULENAME%/sdk -u %AUTH% > %YOUR_MODULENAME%.zip
3) Create a new Git repository and paste the downloaded Data into it. You can include the whole old module code.
4) Create the new native module in the Dashboard and choose the Git-based option. Fill in the needed information and the URL for the repository.
The Git URL for cloning the repository looks like the following:
-
https://intranetgit.yourcompany.com/awesomenativemodule/awesome.git
-
https://yourname@intranetgit.yourcompany.com/awesomenativemodule/awesome.git
You can also create a Git-based Native Module via request to the REST endpoint /modules/{moduleName}/gitinit. See https://apiomat.yourcompany.com/apidocs/index.html#!/modules/initNativeModuleGit.
For more information about creating Git Native Modules, see Creating a new module via Git.
5) Finally make a Git push and then pull the data with the button in the ApiOmat Dashboard. The Git-based Native Module should work properly now.