-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add shading to -fat.jar #9
Comments
Hi @ravenAtSafe, please take another look at the latest available snapshots and give the fat jar a spin. Happy Easter, everyone!! |
Hmmm, after inspecting ucanaccess-5.1.2-20240328.080123-2-fat.jar I'm not sure if we're getting closer (to what we build locally) or not
To be clear, we already have a perfectly viable local build solution but it seems like other users might get value out of a stock jar that fills that niche. I will not object if you choose not to pursue. |
I've added jackcess-encrypt and transitive dependencies to fat jar (unfortunately this leads to a much larger jar mostly due to bouncycastle). Correct, Apache Commons logging and lang3 are dependencies of jackcess-encrypt only, even though jackcess-encrypt pulls them in through the legacy (not forked) jackcess. In order to do this right, jackcess-encrypt would need to get forked as well (to remove dependencies on Apache Commons for one reason), so this is turning into quite a bit of work. Regarding shading, what are your expectations for renaming packages, more precisely, which to rename and which not to rename? Ucanaccess jar itself IMO should not be shaded as it is a driver (not a library), driver name as well as main class (console) must remain untouched. |
We shade everything except for the ucanaccess driver itself. |
@ravenAtSafe Please see the comment posted in issue #7 and review |
If you intended |
Fixed in release 5.1.2 |
The new fat jar added in #7 helpfully bundles all driver dependencies. For example, in ucanaccess-5.1.2-20240327.163958-57-fat.jar I can see
As only one version of any Java class can be loaded it is likely that the ucanaccess driver will not be compatible with other jars that require different versions of those dependencies (either ucanaccess will be poisoned or it will poison others). This is true for the fat or standalone jars.
Adding shading to the fat jar would make ucanaccess a model citizen, safe from possible foreign interactions. This is what we do locally rather than using anything pre-built.
I believe the important bits of our own shading instructions (kinda crude, sorry) for rebuilding ucanaccess are the following (note that ucanaccess doesn't strictly need jackcess-encrypt but users do if they are dealing with encrypted databases - so I guess this request includes packing jackcess-encrypt in there).
The text was updated successfully, but these errors were encountered: