Skip to content

Commit ef9750b

Browse files
authored
Link to new documentation and details about sbt assembly (#113)
* Link to new documentation and details about sbt assembly * Add example for assembly merge strategy
1 parent 5aba5a2 commit ef9750b

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,26 @@ This repository contains examples of custom deserializers usable in Conduktor wi
44

55
You can download the latest jar containing these deserializers [my_custom_deserializers_2.13-2.3.0.jar](https://github.com/conduktor/my_custom_deserializers/packages/1105212)
66

7-
To learn how to use the "custom deserializer" feature see [Conduktor documentation](https://docs.conduktor.io/features/consuming-data/custom-deserializers)
7+
To learn how to use the "custom deserializer" feature see [Conduktor documentation](https://docs.conduktor.io/platform/guides/custom-deserializers/)
8+
9+
## How to build and package custom deserializers
10+
11+
Console requires a single jar containing all dependencies (also known as a "fat" jar) to be able to use a custom deserializer.
12+
To build such a jar for the examples in this repository, you simply have to run:
13+
```sbt assembly```
14+
15+
If you modify the examples to include new dependencies, please make sure that the [assembly merge strategy](./build.sbt) is properly configured to include all the necessary files for your dependencies to work.
16+
17+
For example, if you make add a Custom deserializer using protobuf to this repository, you should modify the existing assembly merge strategy as following:
18+
19+
```scala
20+
assembly / assemblyMergeStrategy := {
21+
case PathList("META-INF", "versions", "9", "module-info.class") => MergeStrategy.first
22+
case PathList("com", "google", "type", xs @ _*) => MergeStrategy.first // New line to properly merge Google libraries
23+
case x => (assembly / assemblyMergeStrategy).value(x)
24+
}
25+
```
26+
827

928
## Simple example
1029

0 commit comments

Comments
 (0)