Eclipse RCP:创建需要2个不同版本插件的产品时出现问题 [英] Eclipse RCP: Problem creating product which needs 2 different versions of a plugin

查看:110
本文介绍了Eclipse RCP:创建需要2个不同版本插件的产品时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于与外部产品兼容的原因,我需要构建一个RCP应用程序,其中必须包含2个版本的插件。插件是org.apache.lucene,当前在Eclipse 3.4中为1.9.1。我需要版本1.4.103才能与其他应用程序兼容。我应该说我的RCP应用最初是使用eclipse 3.2开发的,升级到3.4之后,出现了这个问题。

For reasons of compatibility with an external product, I need to build a RCP application which must include 2 versions of a plugin. The plugin is org.apache.lucene which is currently 1.9.1 in eclipse 3.4. I need version 1.4.103 in order to be compatible with the other application. I should say that my RCP app was originally developed using eclipse 3.2 and after upgrading to 3.4 this problem arose.

在开发和测试过程中,我的应用正常运行。我必须在运行配置中手动添加1.4.103插件,否则运行正常。

During development and test my app worked ok. I had to add the 1.4.103 plugin by hand in the Run configuration but otherwise it ran ok.

现在我处于构建产品阶段,无法在产品向导的配置选项卡中找到添加2个版本的Lucene插件的方法。在运行时,错误指示缺少Lucene的1.4.103版本。

Now I am at the Build Product stage and cannot find a way to add the 2 versions of the Lucene plugin in the Configuration tab of the Product wizard. At runtime an error indicates that the 1.4.103 version of Lucene is missing.

推荐答案

考虑到在OSGi中,捆绑包没有捆绑包之间直接依赖的概念。

每个捆绑软件都通过 Import-Package和 Import-Service标头列出了其他捆绑软件希望注册的服务和软件包。

Consider that, in OSGi, bundles have no concept of direct dependence between bundles.
Instead, each bundle lists the services and packages it expects to be registered by other bundles via the "Import-Package" and "Import-Service" headers.

捆绑软件列出了计划通过导出包和导出服务导出的服务和包。因此,bundle实现之间没有硬依赖性。只要某个捆绑包提供了您导入的软件包,您的捆绑包就会很高兴。

On the opposite side, a bundle lists what services and packages it plans to export via "Export-Package" and "Export-Service". Thus, there are no hard dependencies between bundle implementations. As long as some bundle provides your imported packages your bundle will be happy.

作为一个例子,WTP(Web工具平台)具有重复的javax.wsdl插件

As an illustration, WTP (Web Tools Platform) has Duplicated javax.wsdl plugins:

现在,您应该确保已使用 PDE工具子菜单(右键单击您的项目)转换了3.2插件项目。

Now you should make sure you have converted your 3.2 Plugin project with the sub-menu "PDE tools" (right click on your project).

然后,您可以为rcp应用程序定义产品,您将在其中定义配置( 目标 ),而不是开发目标。

Then you may define an product for your rcp application, in which you will define a configuration (target) for runtime, as opposed to a development target.

这篇关于Eclipse RCP:创建需要2个不同版本插件的产品时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆