Downloading/Uploading Native Modules
This tutorial will guide you through the basic concepts of how to download, import and upload the code of a native module. As this is just an introduction, link to the in-depth-articles will be given at the appropriate places.
Download
You already created a module, and maybe even some classes. Now you want to download the module-code to implement more advanced features than provided by the dashboard. To do this, you need to download the module-code.
-
Download the Module-Code as indicated below. The downloaded file is a zipped Java-Project.
MODULES & UI (1) → Native Module s (2) → Download (3)
Since ApiOmat 3.3 you need Maven to work with Native Modules locally. In case you haven't installed Maven on your local machine, you are able to download the module including maven binaries.
If you're using Maven locally then the option 'Download without maven binaries' should be just fine: -
Import the downloaded module-code into your IDE. In this tutorial, we will use Eclipse. Make sure that your IDE/editor uses UTF-8 character encoding to avoid problems!
-
There are many classes and files already generated into the module-code. The classes that concern you the most are the ones inside the package "com.apiomat.nativemodule.[modulename]". The usage of these classes are part of the next tutorials.
Module Upload
Let's say you changed something inside the code of the native module, for example because you completed the Hook-Methods-Tutorial. Now you need to upload the module to synchronize the changes you made with the native module currently deployed in your application.
Since 3.3 the Module Upload will be done via NativeModule Maven Plugin. More detailed information about the maven plugin mechanism can be found in Upload, Update, Use (JAR).
-
Run via mvn command:
Get your customerName, customerPasswort and host where you want to upload the modified native module and run the following command from your module's project directorybashmvn clean package nm:upload -DcustomerName=<INSERT_YOUR_CUSTOMERNAME> -DcustomerPassword=<INSER_YOUR_CUSTOMERPASSWORD> -Dhost=https:
//
<INSERT_YOUR_HOST>
In case you've downloaded the module with Maven binaries you will find an executable Maven binary called mvnw which you can use to execute the command.
There are still smoother ways to download/upload and import the native module code. The tutorial about Download, Checkout and Import explains them in-depth.
Now, you may ask yourself "so, what exactly can I change inside the module-code that is worth uploading?". This is part of the next Tutorial: Non-Transient Hook Methods