简体   繁体   English

将p2更新添加到e(fx)clipse应用程序

[英]add p2 update to e(fx)clipse application

I am trying to add p2 functionnality to my e(fx)clipse RCP application following this tutorial : https://blog.codecentric.de/en/2015/04/add-p2-update-functionality-to-an-efxclipse-application-eclipse-rcp-cookbook/ 我正在尝试按照本教程在我的e(fx)clipse RCP应用程序中添加p2功能: https ://blog.codecentric.de/zh/2015/04/add-p2-update-functionality-to-an-efxclipse- application-eclipse-rcp-cookbook /

Instead of using the e(fx)clipse 2.0.0 as suggested in the tutorial, the company I work for is still using e(fx)clipse 1.2.0 installed on eclipse 4.4.1 IDE (Luna). 我工作的公司没有使用教程中建议的e(fx)clipse 2.0.0,而是使用eclipse 4.4.1 IDE(Luna)上安装的e(fx)clipse 1.2.0。 I set my target platform like this 我这样设定目标平台

  • Software site : download.eclipse.org/efxclipse/runtime-released/1.2.0/site > FX Target and check Target Platform Feature 软件站点:download.eclipse.org/efxclipse/runtime-released/1.2.0/site> FX Target并检查Target Platform功能

  • Software site : download.eclipse.org/releases/luna 软体网站:download.eclipse.org/releases/luna

    *Eclipse Platform Launcher Executables * Eclipse Platform Launcher可执行文件

    *Equinox Core Function * Equinox核心功能

    *Equinox p2, headless functionalities * Equinox p2,无头功能

    *Eclipse RCP SDK * Eclipse RCP SDK

I then create a simple application based on features. 然后,我基于功能创建一个简单的应用程序。 To do so, I generate the project structure using the e(fx)clipse tools provided by eclipse : File> New > Project > javafx > OSGi > e4 Application Projects. 为此,我使用eclipse提供的e(fx)clipse工具生成项目结构:File> New> Project> javafx> OSGi> e4 Application Projects。 I get the following projects generated. 我生成了以下项目。

+fx.sample.app + fx.sample.app

+fx.sample.app.feature + fx.sample.app.feature

+fx.sample.app.product + fx.sample.app.product

These are my problems: 这些是我的问题:

  1. After adding this dependency: “org.eclipse.fx.core.p2” to the plugin.xml of the fx.sample.app project, exporting the product (via Eclipse export product wizard, and checking “Generate p2 repository”) produces this error: 在添加以下依赖项后:将“ org.eclipse.fx.core.p2”添加到fx.sample.app项目的plugin.xml中,导出产品(通过Eclipse导出产品向导,并选中“ Generate p2 repository”)将生成此文件。错误:

Cannot complete the install because one or more required items could not be found. 由于找不到一个或多个必需项,因此无法完成安装。 Software being installed: SIMPLE PRODUCT 1.0.0 (fx.project.sample.app.product 1.0.0) Missing requirement: My Sample App 1.0.0.201512041706 (fx.project.sample.app 1.0.0.201512041706) requires 'bundle org.eclipse.fx.core.p2 1.2.0' but it could not be found Cannot satisfy dependency: Cannot satisfy dependency: 正在安装的软件:SIMPLE PRODUCT 1.0.0(fx.project.sample.app.product 1.0.0)缺少要求:我的样本应用程序1.0.0.201512041706(fx.project.sample.app 1.0.0.201512041706)需要'bundle org.eclipse .fx.core.p2 1.2.0',但找不到。无法满足依赖关系:无法满足依赖关系:

Following the same step without generating the p2 repository works fine, but the dependency org.eclipse.fx.core.p2_1.2.0.201501301037.jar is missing from the plugins directory of the generated application. 遵循相同步骤而不生成p2存储库可以很好地工作,但是生成的应用程序的plugins目录中缺少依赖项org.eclipse.fx.core.p2_1.2.0.201501301037.jar。

  1. After adding 添加后

org.eclipse.equinox.p2.core.feature org.eclipse.equinox.p2.core.feature

as a required feature of the product configuration file, I click “add required” to add the necessary “ecf” dependencies, but they all appear marked in red, and the export leads to more problems 作为产品配置文件的必需功能,我单击“添加必需”以添加必需的“ ecf”依赖项,但是它们都以红色标记,并且导出会导致更多问题

Is there some sort of conflict between dependencies at 依赖之间是否存在某种冲突

download.eclipse.org/efxclipse/runtime-released/1.2.0/site download.eclipse.org/efxclipse/runtime-released/1.2.0/site

and those found at : 以及位于:

download.eclipse.org/releases/luna? download.eclipse.org/releases/luna?

What could I be missing here? 我在这里可能想念什么?

I'm not an expert on rcp/osgi development so any suggestion would help. 我不是rcp / osgi开发方面的专家,因此任何建议都将有所帮助。

Note : I was able to add p2 to a similar application without major issues using more recent tools (Eclipse Mars IDE 4.5.1 with e(fx)clipse 2.1.0, ), following the above steps 注意:按照上述步骤,我可以使用较新的工具(带有e(fx)clipse 2.1.0的Eclipse Mars IDE 4.5.1,)将p2添加到类似的应用程序中,而不会出现重大问题。

The smallest consistent set of equinox OSGi and p2 is provided via OSGi starter kits. 通过OSGi入门套件提供了最小的春分OSGi和p2。 Look at the features and plugins inside. 查看其中的功能和插件。 You can get it from the Equinox Stable Build: Mars click on the triangular OSGi starter kits and download the appropriate version for you platform. 您可以从Equinox稳定版中获取它:火星单击三角形的OSGi入门套件,然后下载适合您平台的版本。 I would suggest to try the features from the Starter Kit in your product first. 我建议您先尝试使用产品中入门工具包中的功能。 That should suffice. 这样就足够了。 If not compare for the plugins. 如果没有比较插件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM