2

外部製品との互換性の理由から、プラグインの2つのバージョンを含める必要があるRCPアプリケーションを構築する必要があります。プラグインはorg.apache.luceneであり、現在Eclipse3.4では1.9.1です。他のアプリケーションと互換性を持たせるには、バージョン1.4.103が必要です。私のRCPアプリは元々Eclipse3.2を使用して開発されたものであり、3.4にアップグレードした後にこの問題が発生しました。

開発とテストの間、私のアプリは問題なく動作しました。実行構成に1.4.103プラグインを手動で追加する必要がありましたが、それ以外の場合は正常に実行されました。

現在、製品のビルド段階にあり、製品ウィザードの[構成]タブで2つのバージョンのLuceneプラグインを追加する方法を見つけることができません。実行時にエラーは、1.4.103バージョンのLuceneが欠落していることを示します。

4

3 に答える 3

2

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.

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.

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


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

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.

于 2009-01-26T10:16:54.430 に答える
2

私は、BIRT をバンドルした製品を扱ってこの問題をかなり掘り下げ、2 つの異なるバージョンの javax.wsdl の要件を継承しました。多くの wiki ページ、bugzilla エントリなどを読んだ後、これは PDE (プラグイン開発環境) ビルド プロセスの問題であることがわかりました。この問題は Eclipse 3.5 で修正されました。bugzilla エントリはhttps://bugs.eclipse.org/bugs/show_bug.cgi?id=265438にあります。

基本的に、Eclipse 自体で両方のバージョンを指定でき、すべてが正しく解決されます。ただし、PDE ビルド (同じ製品ファイルを使用) は、プラグインの最新バージョンのみをプルします。現在の Eclipse 3.4 ベースに対する私たちの解決策は、追加のプラグインをターゲットの plugins フォルダーに強制的にコピーすることでした。これで当面の問題は解決しました。将来的には Eclipse 3.5 RCP ベースに移行して、上記のバグ修正を適用する予定です。

于 2009-10-02T00:46:36.537 に答える
0

このプラグインを別の名前でソース コードからコンパイルするのはどうですか? または、古いプラグイン関数のラッパーを新しいものに書きますか?

于 2009-03-23T18:16:54.277 に答える