2

Working Eclipse features and plugins, I have a problem with building two separate features (lets call them One and Two) where Two contains plugins that depend on plugins in One. I use PDE Build and ideally would like to have the option to build just One or Two (assuming One was built at some previous point in time).

However, having built One and then trying to build Two I run into the problem that classes that were built in One cannot be resolved. I am trying to get the second build to use the .jar files which were the output of building One, but have had no success. It simply seems it ignores the build output from One.

I've tried various solutions, like using build.properties pluginPath property to refer to the .jar files I depend on. Copying the already built plugins into buildDirectory is not a good option either, since the environment I am working in is a bit messed up and the build directory also contains other plugins that are not to be built (including the plugins built with One).

Any suggestions are welcome!

Cheers,

Anders

Ansig
  • 311
  • 1
  • 4
  • 7

1 Answers1

4

In PDE, features are just sets of plugins. This is meaningful during installation but not during build. So you can't say "plugin X depends on feature Y", you can only say "plugin X depends on plugin Z"

So what you need to do is this:

  1. Add dependencies to the plugins in Two which mention the plugins from One

  2. Add One to the "target platform definition". This is basically a list of plugins which will be available when the plugins of Two will be installed at some time in the future.

This blog post should get you started how to create your own target platform.

[EDIT] These two blog posts might also be useful:

http://pweclipse.blogspot.com/2011/02/pde-build-as-workspace-export.html

http://www.vogella.de/articles/EclipsePDEBuild/article.html

Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
  • Thanks Aaron, appreciate your suggestions! The plugins in Two already have dependencies to the plugins in One. And it seems that the plugins built as part of One should be part of my target when building the plugins in Two, since they are referred to in pluginPath. I'm gonna look into target platform definitions more, though, as I don't quite understand this yet. Thanks! – Ansig Apr 14 '11 at 11:26