v6: include a shaded version of client6 in deployment bundle #429
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #422
Problem
Trying to
java -jara fat JAR built with something likemaven-assembly-pluginusers will see this error as soon as they try to instantiate WeaviateClient:After some investigation (and with invaluable help from @Dabz) the problem is this:
io.grpcuses META-INF/services to dynamically load NameResolver providers. When building a fat JAR, plugins like maven-assembly-plugin won't merge overlapping config files without an additional configuration on the end-user's side.This comment is also very insightful.
Solution
While configuring the plugin is not difficult and we could document this in our README, we will do our users one better:
using
maven-shade-pluginwe can distribute a shaded version of client6 with all its' dependencies' configurations resolved in advance (in addition to the 'slim' version of the lib).Now, when trying to build a fat JAR all that our users will need to do is include
<classifier>all</classifier>tag toclient6block.