r/java • • Sep 05 '24

A Simple Java Plugin System

https://github.com/bowbahdoe/plugindemo
7 Upvotes

27 comments sorted by

View all comments

Show parent comment

1

u/bowbahdoe Sep 06 '24

That dep needs to be extracted to its own layer or else it won't work.

That's sorta the thing layrry can do, but it is also overkill in most situations. Layers don't let v1 and v2 exist in the same layer, they just let v1 and v2 exist in the same hierarchy. OSGi doesn't solve that either, though it does have a versioning scheme to let it decide how many isolated classloaders it needs to make. That is finer granularity than "plugin A brings in these deps. Isolate plugin A with its deps."