Heyho,
Let's say we have this setup:
Application -> plugin -> module
Where "plugin" and "module" depend on "application".
Application uses the version 1.0 of a library. Module depends on the same library, but version 2.0. The classes are the same, but some methods are removed in 2.0 and a few added. Plugin uses the parent ClassLoader of application and module the parent ClassLoader of plugin.
Now the problem is that module uses version 1.0 of the library, but it depends on 2.0 -> for example method not found
What would be the propper way to fix this? Something that would work is to relocate the version 2.0, but maybe there is a workaround during runtime. Maybe it is possible to change the classloaders to fix the problem.
Max
Your options are:
Option 3. would look like:
Application Base -> plugin -> module (lib 2.0)
-> Application Core (lib 1.0)
This essentially makes the plugin and the application core peers and therefore there is no longer a classloader issue.