简体   繁体   中英

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/

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). 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

  • Software site : download.eclipse.org/releases/luna

    *Eclipse Platform Launcher Executables

    *Equinox Core Function

    *Equinox p2, headless functionalities

    *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. I get the following projects generated.

+fx.sample.app

+fx.sample.app.feature

+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:

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:

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.

  1. After adding

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

Is there some sort of conflict between dependencies at

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

and those found at :

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.

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

The smallest consistent set of equinox OSGi and p2 is provided via OSGi starter kits. 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. I would suggest to try the features from the Starter Kit in your product first. That should suffice. If not compare for the plugins.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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