Currently, when a user implements an Optimize plugin and adds a third party library as a dependency that we also use in Optimize, this might cause Optimize to crash.
We should make sure that classes from plugins are loaded over classes from the Optimize fat jar, or in other words to isolate the classloading of the plugin classes with the ones of Optimize.
- classes from plugins are loaded from the plugins and isolated from the Optimize classes, with exception of the ones in the plugin interfaces (since to communicate between plugin and Optimize, these need to be the same classes, i.e. loaded by the same class loader)
- this behavior is documented in the plugin section of the technical guide
- the camunda optimize example repository also contains a hint on that
- Consider having dedicated classloaders per plugin, so people can always package what they need for their plugin without side-effects on either the application or other plugins
- If possible add a warning to the log that a plugin contains dependencies that are also used in Optimize and have a different version and therefore the plugin might not work as expected.