Bug 174157 - PDE Export Wizard don't create correct OSGi bundles
Summary: PDE Export Wizard don't create correct OSGi bundles
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.3   Edit
Hardware: All Windows 2000
: P3 normal (vote)
Target Milestone: 3.3 M7   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 136810 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-14 08:12 EST by Danail Nachev CLA
Modified: 2007-04-05 17:18 EDT (History)
2 users (show)

See Also:


Attachments
Proposal fix for this bug (4.47 KB, patch)
2007-03-02 02:06 EST, Danail Nachev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Danail Nachev CLA 2007-02-14 08:12:57 EST
Build ID: I20061214-1445

Steps To Reproduce:
1. Create new plugin project using the wizard (the plugin must have at least one class). I have selected it to be standard OSGi bundle, but I think it is valid for the remaining choices.
2. Export the plugin using the Right Click -> Export -> Deployable plugins and features
3. Check the generated plugin, its MANIFEST.MF entry is not the first entry in the zip file. This violates the OSGi spec and creates problems when installing bundles from InputStream. 


More information:
This behaviour may not cause troubles on Equinox implementation (the implementation can simply download the whole file, open it as RandomAccessFile and everything will be correct. However, when the Jar file is opened as stream and the framework tries to get the manifest, it will fail. This is not a problem on Equinox, because it first saves the whole file in its storage and then reads the manifest. However, not all OSGi implementations will have such behaviour and can rely on this part of the OSGi spec.
Comment 1 Pascal Rapicault CLA 2007-02-15 21:39:57 EST
Danial, would you be able to investigate the creation of a patch?
This would happen in the AssembleConfigScriptGenerator class and probably more precisely in the "jaring" target.
Comment 2 Pascal Rapicault CLA 2007-02-15 21:43:34 EST
*** Bug 136810 has been marked as a duplicate of this bug. ***
Comment 3 Gorkem Ercan CLA 2007-02-16 00:54:49 EST
In addition to export wizard, PDE generated ANT scripts are also affected from this bug.
Comment 4 Danail Nachev CLA 2007-02-22 07:06:33 EST
I had investigated this and found the place where the fix should go. However, I'm short of time and can't spend enough time for the fix. Once I'm not so occupied I will try to provide a fix.
Comment 5 Danail Nachev CLA 2007-03-02 02:06:52 EST
Created attachment 60131 [details]
Proposal fix for this bug

Here is a proposal fix for this bug. Please review and post any comment or recommendation.
Comment 6 Andrew Niefer CLA 2007-03-29 22:36:47 EDT
looks ok to me, we should put this in M7
Comment 7 Andrew Niefer CLA 2007-04-05 17:18:36 EDT
patch released to HEAD