I wish to add a JNI library, including its shared object (.so) file to my project using Maven. Unfortunately it is not yet on a public repository so I guess I have to install it
I include the .so in the jar and extra the platform specific shared library before loading it. This way it is deployed just like any other jar.
An example of a project where this is done, with multiple .so for different platforms is https://github.com/peter-lawrey/Java-Thread-Affinity
The main class to look at is https://github.com/peter-lawrey/Java-Thread-Affinity/blob/master/src/main/java/com/higherfrequencytrading/affinity/impl/NativeAffinity.java