war/WEB-INF/lib in JPMS concept

Alan Bateman Alan.Bateman at oracle.com
Fri Sep 28 16:45:30 UTC 2018


On 28/09/2018 17:06, Alex Sviridov wrote:
> If we place .war file on JPMS layer and this .war file has .jars in WEB-INF/lib what we should
> do with these jars? Should we deploy them at the the same JPMS layer with .war module?
> I mean :
> JPMS layer:
> - war module
> - jarmodule1_from_war
> - jarmodule2_from_war
> ...
> - jarmoduleN_from_war?
>
> Or should we create for them another layer? Or something else?
This may need someone familiar with servlet or other Java EE specs to 
comment. I think, but not certain, that there is something in the 
servlet spec about the classes in these JAR files needing to be visible 
to the web application class loader. I think it may have something to 
imply that the classes in the web application and the classes loaded 
from lib/* are defined to the same class loader. In any case, if there 
are no overlapping packages then you should be able to map all of the 
modules to the same class loader (defineModuelsWithOneLoader) and it 
should work.

-Alan.


More information about the jigsaw-dev mailing list