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
Fix shaded jar packaging #12589
Fix shaded jar packaging #12589
Conversation
I am also ok to name this distribution/client instead of shaded, since thats really what this thing is. Just seems like it would give us a path forwards to do this stuff in a cleaner way: shading is really sketchy. |
I think that moving shaded to its module is the way to go IMO. You added "elasticsearch-fully-loaded" module. I"m not sure yet what is the goal for this. Is this needed for this change (moving shaded to a distribution module)? |
Most packaging distributions package up the optional dependencies (except slf4j). This needed to be pulled out of distribution/pom.xml so that the shaded distribution can work without having to explicitly disable each and every one of them. It also makes it easier to start removing these duplicate lists of our dependencies (see where i did that in the assembly.xml). Its just a POM we use internally, I dont think it hurts anything. |
Thank you for the explanation.
Agreed. On the other end, we should try to understand if there is really a need for a shaded jar and in which context. |
+1 |
OK, ill keep it |
I pushed a very simple test for the shaded jar, it just does the jar hell check. For now its something other than nothing... |
The change looks good to me. I did not test it though yet. |
I tested, mvn verify passes: i will open some followup issues to improve the testing / do more cleanups |
There are a couple of problems:
Basically this isn't going to work.
This moves shading to distributions/shaded, so it gets a proper POM. and the plan is to add tests for what you are supposed to be able to do with it (e.g. node client, whatever). At the least we can jar hell check it for sanity and other simple tests.
Additionally dependencies for packaging are quite crazy, to add a jar you have to do it in a zillion places... we should try to reduce these (also work in progress).
I hacked a way at this a bit to get towards something manageable. Dependencies of the shaded jar currently look like this (i didnt change the current logic yet):
Seem some jars already got forgotten to be added to the shading configuration, and maybe we really don't need all these jars? So we need to figure out what tests to add and then we can adjust this as necessary.