How to resolve dependencies against fragments in a target platform? [message #695292] |
Mon, 11 July 2011 12:52 |
Paul Messages: 2 Registered: July 2011 |
Junior Member |
|
|
Hello all,
I was hoping someone could help with an issue I have been having with resolving dependencies against fragments in a target platform.
I'm working on a project using Equinox. We are developing a framework application that supports multiple teams, each writing their own components (plugins).
I would like to supply them with a target platform (our framework) which they can point to within Eclipse, allowing them to develop their plugins against it. This all works fine, apart from one major drawback... none of the packages exported by fragments contained in the target platform are resolved by the workspace (the target plugins are resolved without problem). This leads to a raft of "cannot be resolved to a type" errors, even though when you actually launch, everything resolves fine at runtime.
For information, one fragment contains a lib directory containing 3rd party jars that some teams use. The relevant packages supplied by these jars are exported by the fragment. If a plugin needs any of these packages, it lists them as an imported dependency.
This problem does not occur when you have the offending fragments actually checked out as projects within your workspace, but this is a rather ugly implementation to have to give the component teams.
On a similar note (probably due to the same mechanism), I have had an issue when trying to run a headless build of a plugin I have developed. It cannot build the plugin as it fails to resolve the classes contained in the fragments within the target platform, even though it is pointing right at them! Again, I can build it from the workspace when I have the target platfrom checked out too.
Is this really the case, or is there hope?! How can I get Eclipse to "see" the packages I need?! How can I make my headless build resolve its dependencies?!
Any help is greatly appreciated.
Kind Regards
Paul
[Updated on: Mon, 11 July 2011 12:53] Report message to a moderator
|
|
|
|
Re: How to resolve dependencies against fragments in a target platform? [message #695706 is a reply to message #695317] |
Tue, 12 July 2011 11:32 |
Paul Messages: 2 Registered: July 2011 |
Junior Member |
|
|
Thanks for the reply Thomas, I've had a good look at the links you provided
I'm downloading Indigo as I speak, so I'll try that out soon!
We are trying to provide API from the fragment. Basically we are using JIDE, and have several JIDE jars in the lib folder of the fragment. Actually the fragments only purpose is to supply these jars! The fragment's host is the system.bundle referenced in the framework target platform. The reasons for this choice are not know, as this was all setup by a previous team member. I'm guessing it's for the framework developers, so the plugins that makes up the framework are able to build against it in the workspace.
What I'd like to do is create a target platform for our plugin developers (After the framework is built, I took all the jar files that make it up, and put them with the framework target platform). I was hoping they could just use this as their target platform to develop the plugins against. This works fine apart from resolving the JIDE dependencies. I'm not sure if it's due to it being a fragment, or due to the nested jars?
Eclipse-ExtensibleAPI is set to true in the system.bundle. It seems to me it's all down to the nesting. I may try and split the jars into seperate fragments and see if this works, but my team don't like this, and this doesn't sound like a great solution (we are lucky we don't have alot of jars, but if you did, it would be pretty ridiculous).
I tried setting the fragment unpack=true, which semi-worked... now the manifest of the plugin I developed no longer shows errors on the JIDE import packages, however, the packages still cannot be resolved in my code, even though the manifest seems to have been satisfied :/
Any further help/suggestions on a better way of doing this are appreciated as always.
Cheers
Paul
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03041 seconds