I am using the Maven Publishing plugin and I need to set the final file name of an artifact (a native JNI library actually). I need it to be named
libfoo.so but the Maven Publishing plugin renames it to
project-version-libfoo.so. The Linux dynamic linker cannot load this.
Is there a way to manually set the final name of a Maven artifact?
If not, is there a way to prevent prepending of
project-version- to the artifact name?
I cannot figure a way to do this by setting
This hack has been reported to work in a related setting but I haven’t tried it myself. I would prefer a non-hack solution.
In case other Gradle users run into the same problem, I currently resort to another approach: include the shared libraries into a JAR file so their names are preserved, and load them using NativeUtils.