Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353484 - Incorrect value for Service-Component header when bundle has a custom root
Summary: Incorrect value for Service-Component header when bundle has a custom root
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.8 M3   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 361148
  Show dependency tree
 
Reported: 2011-08-01 06:11 EDT by Kaloyan Raev CLA
Modified: 2011-10-25 14:23 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kaloyan Raev CLA 2011-08-01 06:11:40 EDT
Steps to reproduce:
1. Create a new OSGi Bundle/Plug-in project with Bundle Root that is different from the Project Root. For example, create a new Web Application Bundle (WAB) project: http://wiki.eclipse.org/Libra/Getting_Started#Create_new_Web_Application_Bundle. In this case the Bundle Root is the /WebContent folder.
2. Create an OSGI-INF folder under the Bundle Root folder. In the case of WAB example /WebContent/OSGI-INF. 
3. Call the New Component Definition wizard and create a new component.xml under the OSGI-INF folder.

The component.xml is correctly created, but the MANIFEST.MF is incorrectly modified. The Service-Component header points to the component.xml, but the path is relative the Project Root instead of to the Bundle Root. 

In the WAB example, it looks like:

  Service-Component: WebContent/OSGI-INF/component.xml

while it should look like:

  Service-Component: OSGI-INF/component.xml
Comment 1 Curtis Windatt CLA 2011-09-30 14:53:35 EDT
Fixed in master.  See DSCreationOperation.java.  The file path that is entered in the manifest is now made relative to the bundle root rather than the second segment of the filepath.
Comment 2 Kaloyan Raev CLA 2011-10-16 07:40:29 EDT
Thank you for the fix, Curtis! I tested it with Juno and it works perfectly. 

Is it possible to downport the fix for Indigo SR2? This bug affects and adopter's scenario that is currently being developed on top of the Indigo stream.
Comment 3 Curtis Windatt CLA 2011-10-25 14:23:38 EDT
Verified in I20111021-1625 and by the original reporter.