Vaadin-Core under EAR-level lib directory

Hi,

Since that V13 has OSGi support, I am wondering whether it’s possible to put vaddin-core (and other webcomponents) jars under EAR-level lib directory and package the application as EAR. If so, how to configure that? I am using WildFly 13+ as the application server.

Many thanks,
Joey

EAR packaging is sometimes having its own problems in corner cases, but you can find simplified example of it here

https://gitlab.com/mrts/vaadin12-javaee-multiple-wars-in-one-ear

Now, if you want to add OSGi into picture I do not know what special cases will emerge, I do not know what benefits you actually want to achieve with it.

Note also, I would recommend to use WildFly 15, since it has updated version of WELD that fixes some issues, regarding class loader problems with multiple WARs in EAR cases.

Thanks a lot. Our application has a EJB module, and we had a tool to help user automatically deploy custom codes into EAR package. That’s the reason why we still consider to package in EAR. We are rewriting our application with Vaadin framework, but hope to minimize our modification efforts.

Many thanks,
Joey

Hi, Tatu,

I studied your example. It seems that each WAR has duplicated vaadin-core jars under WEB-INF/lib. My hope is to have a global EAR-level library directory and put every libaray jar (including vaadin-core, webcomponents, and jars required by EJB module) under that lib. I don’t know whether I need OSGi to resolve the static resources reference issues. Any suggestions of how I can achieve that?

Best regards,
Joey