<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Lin,<br>
<br>
our current 'Overlay feature" implementation is quite limited to
be honest.<br>
It is not possible to introduce new files inside jar inside war that
is in ear.<br>
The only exception is if war is exploded inside ear.<br>
Further more it is not possible to overlay static content inside
wars<br>
(although Wildfly documentation for overlays feature promises that).<br>
The reason is every war is exploded to temporary location during <br>
the deploy process and<br>
<br>
org.wildfly.extension.undertow.deployment.ServletResourceManager <br>
<br>
obtains physical location of that exploded archive and passes it to<br>
FileResourceManager / PathResourceManager in its constructor.<br>
<br>
This at first sight innocent hack bypasses all VFS modifications.<br>
So although you would mount war static files properly via overlays,<br>
those overlays will be completely ignored.<br>
The only exception are deployment descriptors,<br>
which are processed during the deployment phase.<br>
<br>
Note: Don't get confused with overlays in ServletResourceManager.<br>
Those are Undertow specific and have nothing to do with WildfFly
deployment overlays.<br>
<br>
In order to fix your concrete problem (i.e. adding new file
inside <br>
jar in war in ear) I'd guess fixing just DeploymentOverlay
processors will be insufficient.<br>
With high probability you'll need to revisit also
WarDeploymentStructureProcessor.<br>
<br>
Good news is 'Wildfly Deployment Overlays' should work without
any limitations in <br>
upcomming Wildfly 11. There's a PR eliminating Wildfly dependency on
JBoss VFS:<br>
<br>
<a class="moz-txt-link-freetext" href="https://github.com/wildfly/wildfly-core/pull/1261">https://github.com/wildfly/wildfly-core/pull/1261</a><br>
<br>
The PR incorporates 'Deployment Overlay' complete rewrite with no
limitations<br>
current implementation has.<br>
<br>
On 12/23/2015 05:17 PM, Lin Gao wrote:<br>
<blockquote
cite="mid:CAB9RxxGVYer0XSXRKEzi9jm=DUvywRHXK74cPskkv3SGojm=EA@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div> I am working on <a moz-do-not-send="true"
href="https://issues.jboss.org/browse/WFCORE-761">https://issues.jboss.org/browse/WFCORE-761</a>
for a while, and I am stuck in the case of overlaying files in
jar of war of ear.</div>
<div><br>
</div>
<div> I want to know that do we support overlay for files in
jar of war of ear? like:
xx.ear/yy.war/zz.jar/META-INF/config.properties</div>
<div><br>
</div>
<div> DeploymentOverlayDeploymentUnitProcessor.java[1] and
DeferredDeploymentOverlayDeploymentUnitProcessor.java[2] are
classes to handle the deployment overlay, but in this case,
the jar of war of ear does not get mounted yet, which leads
to DeferredDeploymentOverlayDeploymentUnitProcessor.handleEntryWithFileParent()
method is called, which just prints the error message.</div>
<div><br>
</div>
<div> 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?</div>
<div>
<div><br>
</div>
<div>[1] <a moz-do-not-send="true"
href="https://github.com/wildfly/wildfly-core/blob/master/server/src/main/java/org/jboss/as/server/deployment/DeploymentOverlayDeploymentUnitProcessor.java">https://github.com/wildfly/wildfly-core/blob/master/server/src/main/java/org/jboss/as/server/deployment/DeploymentOverlayDeploymentUnitProcessor.java</a></div>
<div>[2] <a moz-do-not-send="true"
href="https://github.com/wildfly/wildfly-core/blob/master/server/src/main/java/org/jboss/as/server/deployment/DeferredDeploymentOverlayDeploymentUnitProcessor.java">https://github.com/wildfly/wildfly-core/blob/master/server/src/main/java/org/jboss/as/server/deployment/DeferredDeploymentOverlayDeploymentUnitProcessor.java</a></div>
<div><br>
</div>
<div>Best Regards</div>
-- <br>
<div class="gmail_signature">Lin Gao</div>
<div class="gmail_signature">JBoss Software Engineer</div>
<div class="gmail_signature"><br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
wildfly-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/wildfly-dev">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Richard Opalka
Principal Software Engineer
JBoss by Red Hat
Mobile: +420 731 186 942
</pre>
</body>
</html>