our current 'Overlay feature" implementation is quite limited to
It is not possible to introduce new files inside jar inside war that
is in ear.
The only exception is if war is exploded inside ear.
Further more it is not possible to overlay static content inside
(although Wildfly documentation for overlays feature promises that).
The reason is every war is exploded to temporary location during
the deploy process and
obtains physical location of that exploded archive and passes it to
FileResourceManager / PathResourceManager in its constructor.
This at first sight innocent hack bypasses all VFS modifications.
So although you would mount war static files properly via overlays,
those overlays will be completely ignored.
The only exception are deployment descriptors,
which are processed during the deployment phase.
Note: Don't get confused with overlays in ServletResourceManager.
Those are Undertow specific and have nothing to do with WildfFly
In order to fix your concrete problem (i.e. adding new file
jar in war in ear) I'd guess fixing just DeploymentOverlay
processors will be insufficient.
With high probability you'll need to revisit also
Good news is 'Wildfly Deployment Overlays' should work without
any limitations in
upcomming Wildfly 11. There's a PR eliminating Wildfly dependency on
The PR incorporates 'Deployment Overlay' complete rewrite with no
current implementation has.
On 12/23/2015 05:17 PM, Lin Gao wrote:
I want to know that do we support overlay for files in
jar of war of ear? like:
classes to handle the deployment overlay, but in this case,
the jar of war of ear does not get mounted yet, which leads
method is called, which just prints the error message.
The way to fix it maybe mount the jar(VFS.mountZip)
beforehand, but it is specific to the case of ear/war/jar, and
these 2 classes are more generic(they are in wildfly-core, no
ee nor undertow extension), so where this can be fixed?
JBoss Software Engineer
wildfly-dev mailing list
Principal Software Engineer
JBoss by Red Hat
Mobile: +420 731 186 942