Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329390 - PDE does not recognize bundles in the target platform if they don't have a qualifier in their version
Summary: PDE does not recognize bundles in the target platform if they don't have a qu...
Status: RESOLVED INVALID
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-03 15:05 EDT by Hugues Malphettes CLA
Modified: 2010-11-03 17:07 EDT (History)
0 users

See Also:


Attachments
PDE does not find the jruby bundle (285.02 KB, image/png)
2010-11-03 17:04 EDT, Hugues Malphettes CLA
no flags Details
With the same bundle minus the bsf import ok. (253.69 KB, image/png)
2010-11-03 17:07 EDT, Hugues Malphettes CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hugues Malphettes CLA 2010-11-03 15:05:23 EDT
With PDE 3.6.1
- Download jruby-complete 1.5.3 into the folder jruby-1.5.3 from maven central or from http://jruby.org:
http://repo2.maven.org/maven2/org/jruby/jruby-complete/1.5.3/jruby-complete-1.5.3.jar
- Create a new blank target platform and add the directory jruby-1.5.3
- Check the content tab, the org.jruby.jruby (1.5.3) bundle is listed

The jruby bundle is not discovered by PDE.
3 ways to identify this:
1- via the launch configuration, in the bundle tab org.jruby.jruby does not appear.
2- via the "External Plugin Libraries" when the Target Definition includes all plugins in the java search: jruby is not listed there either.
3- when developing a an osgi plugin and trying to import the package org.jruby.embed it fails.


Workaround: repackage jruby-complete with a qualifier in the MANIFEST:
http://www.intalio.org/public/maven2/org/jruby/jruby-complete/1.5.3.20101104/jruby-complete-1.5.3.20101104.jar
Import this repackaged bundle in your target platform as a replacement.
Now everything works as expected.
Comment 1 Hugues Malphettes CLA 2010-11-03 15:11:09 EDT
oops I might have gotten really confused. Please hang on and let me check a few more things before I'll probably mark this as INVALID.
Comment 2 Hugues Malphettes CLA 2010-11-03 16:53:07 EDT
Well when jruby is part of a big target platform where all its optional dependencies are resolved, PDE suddenly considers it invisible.

I tried to come up with a minimum target platform to reproduce this and failed.
If I remove jruby's optional import of org.apache.bsf then the problem disappears so far.

I'll attach a screenshot that shows org.jruby.jruby in the tree of dependencies of my plugin and next to it PDE compiler reporting that it cannot find the org.jruby.embed package.

If someone has an idea as to where the PDE could decide to not include a bundle it its compiler classpath or RequiredPlugins node I would be happy to try to debug it.
Comment 3 Hugues Malphettes CLA 2010-11-03 17:04:24 EDT
Created attachment 182334 [details]
PDE does not find the jruby bundle

PDE refuses to compile. Can't find org.jruby.embed.
The dependencies tree does show org.jruby.jruby 1.5.3 and so does the target platform. The package is in fact exported correctly by that bundle.
Comment 4 Hugues Malphettes CLA 2010-11-03 17:07:59 EDT
Created attachment 182336 [details]
With the same bundle minus the bsf import ok.

Same than before with a slightly different version of org.jruby.jruby
Let's also note that p2director has no problem with the original jruby-complete bundle and tycho is comfortable compiling the whole thing with jruby-complete.

My apologies for this lousy bug report. If someone gives me hints on where the issues might be I can try to narrow it.