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
Specify classifiers instead of using os detection in netty-all
#11278
Conversation
c3aab5a
to
ebf6675
Compare
@candrews I think this will not work... as for example on linux you will still enable the linux profile when depending on netty-all and so the native dns resolver for macOS will not be included. Which means when you build on linux but deploy to Mac you will run into issues imho... the same is true for building on macOS but deploy to linux |
basically netty-all should "pull in" all native dependencies no matter on which system your run and build (that was how it behaved before) |
@normanmaurer I don't follow your reasoning, the changes look right to me. If you are building with <!-- The linux profile will only include the native jar for epol to the all jar.
If you want to also include the native jar for kqueue use -Puber.
--> I agree that in general it would be best to just use the uber profile so that the resulting artifacts can be deployed anywhere and work with the appropriate native libs in each case. |
@njhill the problem is that the profiles will be included in the pom that is deployed and so automatically activated based on the system you are pulling the dependency in |
@normanmaurer ok I see what you mean. The changes in this PR are still "correct" just orthogonal to the problem you're describing. Again the way the comments are worded in the pom, it sounds like the profiles are intended to be set/specified based on a target deployment environment rather than activated based on the detected build environment. If that's not correct and the profile is set based on the detected OS at build time, then it's wrong to have this profile separation in the |
Motivation: The OS used to build netty-all is irrelevant to the system using `netty-all`. The build environment's OS should not impact the dependencies of `netty-all`. The OS used to build netty-all is irrelevant to the system using `netty-all` at runtime. So instead of using `os-maven-plugin` via the `jni.classifiers` property to set dependency classifiers, set the correct classifiers explicitly. Modification: Set classifiers of the dependencies in `netty-all`. Result: Fixes netty#11272 See netty#8097
It seems to me that all the
The problem with this change is that it results in dependencies for platforms other than the one being built cannot be found. For example, when I build on my Linux system,
Which of course makes sense. If it could build, the result would be correct - but I'm not sure how to get it to build. I've updated this PR with this change so hopefully someone else can suggest a way forward. |
ebf6675
to
9eae3f1
Compare
I'm looking at |
@chrisvest reading #9689 (comment) it sounds like netty uses something other than GitHub Actions to build the MacOS native libraries. How does that work? I'm guessing a similar solution is currently in place for Windows, too, based on #11284 |
@candrews I don't know how the MacOS builds work, exactly. Just that they aren't GitHub Actions. |
This can be closed now with #11732 in |
Motivation:
The OS used to build netty-all is irrelevant to the system using
netty-all
.The build environment's OS should not impact the dependencies of
netty-all
. The OS used to build netty-all is irrelevant to the system usingnetty-all
at runtime. So instead of usingos-maven-plugin
via thejni.classifiers
property to set dependency classifiers, set the correct classifiers explicitly.Modification:
Set classifiers of the dependencies in
netty-all
.Result:
Fixes #11272
See #8097