| Summary: | [UI] JARed plug-in with internal JARs requires . on Bundle-ClassPath in MANIFEST.MF | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Edward Sargisson <esarge> | ||||
| Component: | UI | Assignee: | PDE-UI-Inbox <pde-ui-inbox> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | curtis.windatt.public, refsdal.ivar, stew | ||||
| Version: | 3.1 | Keywords: | helpwanted | ||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
|
Description
Edward Sargisson
Well this is obviously an old issue. Nevertheless it still happens. The OSGi specification says that the default Bundle-Classpath is '.'. If you specify Bundle-Classpath though, you also need to specify '.'. However, things will still appear to build fine without the dot. When you try to start the bundle though, an exception like this will happen: osgi> start xxx org.osgi.framework.BundleException: The activator xxx.yyy.zzz.Activator for bundle xxx.yyy.zzz is invalid My suggestion is that Eclipse should detect and, like Equinox/OSGi, make this, i.e. the missing dot, an error and provide a quick fix assist for this. Created attachment 222732 [details]
plugin that demonstrated incorrect calculation of workspace classpath
This issue still exists in Juno. If I add a jar to the Bundle-Classpath (which forces me to specify a Bundle-Classpath, rather than let it default) and remove the ".", this action is ignored when computing the classpath in the workspace. Any classes from the src folder can still be referenced, and packages can be exported. When the project is exported as a binary plugin, the contents of the src folder don't even get compiled. Worst case scenario: I export a bundle which references an activator that never got exported, which can never start. This can all happen without being told at all. Not including . on the Bundle-Classpath is totally valid of course, but the workspace classpath should take this into account. Forcing recalculation of the classpath doesn't resolve the issue. I've attached a sample source plugin that demonstrates this. Moving to PDE UI as any warnings/quickfixes would belong to PDE UI. Adding helpwanted keyword as I do not currently have time to work on this. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |