Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Modularity with Vaadin and OSGi
I have implemented a nice OSGi-based solution for modules within a Vaadin application, inspired by the blog entry that can be found here: https://vaadin.com/wiki/-/wiki/Main/Creating+a+Modular+Vaadin+Application+with+OSGi
What is the scenario? We have a core and several plugins that offer different visualization options for the same thing. Each of them provides a Vaadin component to the core. I have eliminated the war file and turned all archives into OSGi compliant jars. Things are working fine, but one problem remains:
Is there a way to put the plugin related Javascript code for the plugins’ widgets into the plugin jars themselves and not in the core? I have implemented a VaadinResourceManager that is used by Vaadin to get resources from the bundles, but Vaadin always tries to get the resources from the core-widgetset. The only solution is to inherit from all the plugin widgetsets in order to make sure that the Javascript code is available in the core-widgetset. I would be much better to put this code into the plugin jars and let Vaadin ask to get the resources from the plugin-widgetset.
Has anybody an idea of how to achieve this behavior?