Skip to content
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

Distributed by classifier? #437

Open
chengenzhao opened this issue Feb 18, 2023 · 3 comments
Open

Distributed by classifier? #437

chengenzhao opened this issue Feb 18, 2023 · 3 comments

Comments

@chengenzhao
Copy link

chengenzhao commented Feb 18, 2023

Hi:

We happen to see this dependency
It is very useful lib
and one interesting thing is in the lib directory
all different platforms(darwin, linux, windows) and architectures of cpu(arm, 32bits, 64bits, x64, x86) are packaged together
so is it possible to distribute different libs with classifier for different platform and architecture?
like JavaFX does?
https://repo1.maven.org/maven2/org/openjfx/javafx-controls/20-ea+11/
using classifier to separate them
https://repo1.maven.org/maven2/org/openjfx/javafx/20-ea+11/javafx-20-ea+11.pom
more information here:
https://maven.apache.org/plugins/maven-deploy-plugin/examples/deploying-with-classifiers.html

Thanks

@chengenzhao
Copy link
Author

This feature could be very useful when it comes with jlink to customize the runtime
the jlink will package the native part into the runtime

@kwhat
Copy link
Owner

kwhat commented Feb 18, 2023

Maven itself doesn't even support classifiers and last I read they were being phased out in favor of multi-release jars. The java build process is nothing short of a dumpster fire. I am sure Gradle is slightly better than Maven but honestly Maven was far worse than Ant and anything including a bunch of shell scripts would be an improvement. I have no desire to look at the build system for this project, but if you want to try and introduce classifiers into mavens deploy plugin, by all means, create a branch and I will be happy to look it over.

With that said, you probably don't even want to use the native library auto loading from Java FX. The whole concept of unpacking the jar and loading the native library was only provided as a convenience and is not even close to the officially supported java.library.path property. JavaFX has its own way of looking for native libraries, but it's been years and I don't remember how they did it.

This library also has the ability to override how the native library is located which should give you the flexibility to do just about anything for your customer facing deliverables.

@chengenzhao
Copy link
Author

chengenzhao commented Feb 19, 2023

If I remember right
JavaFX almost does the same thing as you do in this project
they cache the dylib etc. in the
{username}/.openjfx/cache/{version}/{arch} directory
截屏2023-02-19 上午10 23 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants