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

Bug 347889

Summary: OSGi support for META-INF/web-fragments, META-INF/resources should follow the directive visibility:=reexport
Product: [RT] Jetty Reporter: Hugues Malphettes <hmalphettes>
Component: osgiAssignee: Hugues Malphettes <hmalphettes>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jetty-inbox
Version: 7.4.2   
Target Milestone: 7.4.x   
Hardware: All   
OS: All   
Whiteboard:

Description Hugues Malphettes CLA 2011-06-01 04:42:27 EDT
This is an enhancement for bug 346027:

When a web-bundle hosts an OSGi fragment or requires a bundle, that artifact is scanned for META-INF/web-fragments, META-INF/resources (jetty-7) and discoverable servlet-3.0 annotations.

The enhancement consists of looking into the OSGi fragments and required bundles of this dependency. When they are marked with the directive visibility:=reexport the corresponding dependency should transitively be scanned for META-INF/web-fragments, META-INF/resources and the servlet-3.0 discoverable annotations.

That behavior is consistent with the visibility of classes and resources in OSGi.
Comment 1 Hugues Malphettes CLA 2011-06-01 04:51:06 EDT
Here is an example:

Web-Bundle com.acme.webapp
  Require-Bundle: com.acme.cappucino.lib

OSGi bundle: com.acme.cappucino.lib/META-INF/resources (static files, jsp etc added to the webapp)
  Require-Bundle: com.acme.cappucino.mocha;visiblity:=reexport

OSGi bundle:
com.acme.cappucino.mocha/META-INF/resources (static files, jsp etc added to the webapp as well)

The static resources added to the the webapp com.acme.webapp are:
- com.acme.cappucino.lib/META-INF/resources
- com.acme.cappucino.mocha/META-INF/resources
Comment 2 Hugues Malphettes CLA 2011-06-01 05:14:34 EDT
Fixed for 7.4.3