2

使用 Eclipse 功能和插件时,我在构建两个单独的功能(我们称它们为 One 和 Two)时遇到了问题,其中 Two 包含依赖于 One 中的插件的插件。我使用 PDE Build,理想情况下希望可以选择只构建一个或两个(假设一个是在以前的某个时间点构建的)。

但是,在构建 One 之后尝试构建 Two 我遇到了无法解决 One 中构建的类的问题。我试图让第二个构建使用 .jar 文件,这些文件是构建 One 的输出,但没有成功。它似乎忽略了 One 的构建输出。

我尝试了各种解决方案,例如使用 build.properties pluginPath 属性来引用我所依赖的 .jar 文件。将已经构建的插件复制到 buildDirectory 也不是一个好的选择,因为我工作的环境有点混乱,并且构建目录还包含其他不构建的插件(包括使用 One 构建的插件)。

欢迎任何建议!

干杯,

安德斯

4

1 回答 1

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

于 2011-04-14T09:16:06.410 回答