-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packaging and Maven-Repo artifact deployment #2
Comments
Hi Raj, I appreciate your interest in Circe. The snapshot release you mention was never intended to be used by anyone. I can attempt to perform your first solution to get an initial release I don't really understand the cause of your .nar vs .jar issue. I'd need to I'm still not sure what the real solution is going forward, as any build |
Hi Trevor, Thank you for your prompt response.
I have added test-case to explain issue: how
So, to resolve this issue:
Therefore, I created a pull request: which creates a jar and it auto loads library and user don't have to pass change in pull request
Request
Thanks for your work. |
hi,
Thanks for providing java solution for crc32c-sse4.2 using native library. I can see you have uploaded SNAPSHOT version of this artifact at : Sonatype-Staging_maven-repo
However, we are not able to use this solution due to following issues:
Solutions:
1. Upload jni library to maven repo for all well-known OS: Right now, Maven repo only contains
jni
forwindows
so other system can't use this library. So, can you also please upload library forMacOSX
andLinux
as well.2. One Packaging of all OS specific JNI library using vagrant: Checkout RocksDB Build it uses
vagrant
to buildjni
for all OS environments and packages them into one artifact which you can deploy tomaven repo
When we build circe-crc32c-sse42 using maven build:
jni
library under.nar
artifact. e.g:circe-crc32c-sse42.nar
NarSystem.java
which tries to load thisjni
library at runtime usingSystem.loadLibrary("circe-crc32c-sse42-0.1-SNAPSHOT");
which fails obviously because it asksClassLoader
to load library fromjava.library.path
orsun.boot.library.path
. And as thisjni
library is packaged under.nar
so, definitely it is not present in eitherlibrary.path
and hence, initialization of the interface which provides API to compute checksum Sse42Crc32C.java fails.Solution
circe-crc32c-sse42.jar
insteadcirce-crc32c-sse42.nar
artifact and internally loads generatedjni
library without messing up withlibrary.path
and user can use this artifact without performing any additional magic.I have also added a test case which cleanly uses
Sse42Crc32C.java
to compute checksum by simply adding dependency of artifactcom.scurrilous:circe-crc32c-sse42:${project.version}
and without worrying about configuringlibrary.path
.The text was updated successfully, but these errors were encountered: