Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 423759

Summary: Implement the "Serve modules without publishing" feature for Tomcat 8
Product: [WebTools] WTP ServerTools Reporter: Larry Isaacs <larryisaacs>
Component: jst.serverAssignee: Larry Isaacs <larryisaacs>
Status: RESOLVED FIXED QA Contact: Elson Yuen <eyuen7>
Severity: normal    
Priority: P3 CC: eyuen7, f.munafo
Version: 3.6Flags: eyuen7: review+
Target Milestone: 3.6   
Hardware: PC   
OS: All   
See Also: https://git.eclipse.org/r/109230
https://git.eclipse.org/r/109242
Whiteboard: PMC
Attachments:
Description Flags
Add Web Fragment support for Tomcat 8 Serve modules without publishing feature eyuen7: review+

Description Larry Isaacs CLA 2013-12-10 19:10:23 EST
Tomcat 8 implements resource handling differently that prior versions.  Thus, a new implementation for the "Serve modules without publishing" feature will be needed.  After a cursory inspection, it appears that this may be possible in Tomcat 8 without a special classloader.  Just appropriate content written to the context.xml may be sufficient.
Comment 1 Larry Isaacs CLA 2014-05-13 07:58:19 EDT
Created attachment 243019 [details]
Add Web Fragment support for Tomcat 8 Serve modules without publishing feature
Comment 2 Larry Isaacs CLA 2014-05-13 08:04:27 EDT
An initial implementation of the "Serve modules without publishing" feature was included in M7. However, because the Tomcat 8 support for this feature is very different from prior Tomcat versions, further research was needed for one aspect of this feature. This was support for "META-INF/resources" folders found in Web Fragment projects. I now have this implemented and tested.

Info for PMC Review:

Explain why you believe this is a stop-ship defect.

The implementation of the "Serve modules without publishing" is currently missing support for "META-INF/resources" from Web Fragment projects. This would represent a regression in behavior compared to the support of this feature for prior versions of Tomcat.

Is there a work-around?

No.

How has the fix been tested?

I have some specially crafted projects which try to exercise many aspects of Deployment Assembly with the "Serve modules without publishing" feature. This includes tests to verify that "META-INF/resources" folders in Web Fragment projects are now served correctly when the "Serve modules without publishing" feature is enabled.

Give a brief technical overview. Who has reviewed this fix?

The "Serve modules without publishing" feature collects "META-INF/resources" resources from Web Fragment dependent projects in a field called virtualDependentResources.  These need to be processed and included in the published Tomcat configuration so they can be seen as part of the "deployed" web application. The patch adds the needed implementation for this.  No one else has reviewed this fix.

What is the risk associated with this fix?

Minimal.  It only affects an isolated feature of the Tomcat 8 support in the Tomcat plug-ins.
Comment 3 Elson Yuen CLA 2014-05-21 13:30:37 EDT
I have reviewed the fix and the proposed patch looks good to me.
Comment 4 Larry Isaacs CLA 2014-06-05 14:10:06 EDT
Sorry, I though I had marked this fixed but must have gotten interrupted and didn't get back to it.  Too many distractions.  Technically, this made it into 3.6 RC2.
Comment 5 Eclipse Genie CLA 2017-10-11 16:41:54 EDT
New Gerrit change created: https://git.eclipse.org/r/109230
Comment 6 Eclipse Genie CLA 2017-10-11 16:42:27 EDT
New Gerrit change created: https://git.eclipse.org/r/109242