This repository has been archived by the owner on Apr 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Shading of jar does not work #34
Comments
After reading it again. I think you need to relocate the libraries by hand like so:
Read this https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html |
Like this :
|
Open
I'm also not an expert on this, so at least we're on the same page. If you're including JNA and not using it it is best to let discord-rpc handle the bindings. However, if you ARE using JNA for a custom solution of your own, I can look into shading so that our dependencies don't get in the way of yours. |
I am using JNA my self that is the issue and a newer version 5.0.0 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am not an expert on this, but here is my problem.
My app uses jna version 5.0.0.
Discord-rpc uses version 4.5.1
When running my app it loads the jna lib from the discord library making it crash with NoSuchMethodError.
The solution to the issue is the library using the shade plusgin as described here https://labs.spotify.com/2015/09/01/java-linking/ .
If I look into your maven pom.xml then I see you use that plug-in
So there should not be any problems but the classes are never the less normally included in the discord-rpc jar and i would expect them to be under net.arikia.dev path or something so my app does not load them as jna. I do admit I got not much of an idea of this shading plugin...
Maybe I will have a look into it, but would be cool if somebody of u could do it I have a really hard time reading into that shade-plugin docu.
The text was updated successfully, but these errors were encountered: