Home » Eclipse Projects » Rich Client Platform (RCP) » creating p2 update site for RCP
creating p2 update site for RCP [message #532708] |
Mon, 10 May 2010 18:53  |
Eclipse User |
|
|
|
Hello,
I am trying to develop a p2 based update site for our RCP app which is based on Eclipse 3.5.2.
I have followed through Ralf Ebert's tutorial and got it working for RCP mail app, but am a bit stuck with our app which is slightly more complicated.
Our product consists of 3 features developed by ourselves, ( plus p2.ui & rcp features):
baseFunctionalityFeature ( contains core functionality plugins)
brandingFeature (contains plugin with .product and p2.inf files)
supportFeature ( contains plugins for support libraries)
The deployed app is generated through a standard PDE ant script.
We would like to be able to update the 'supportFeature' independent of the rest of the application. All features are on the same update site. However, we can only update the branding feature ( which contains the plugin with the .product file and p2.inf).I.e., the product does not detect new versions of the supportFeature after clicking 'Check For Updates', only the product itself.
So, my question is this: how can I get a product to detect updates to features which have not themselves been installed through an update site? (If, for example, I try installing 'supportFeature' into Eclipse, rather than our RCP app, all goes fine and subsequent updates are detected by 'Check For Updates').
In the mail example, this problem does not arise, as there is only 1 feature which contains 1 plugin which has the .product and p2.inf files.
Do I need to add more p2.inf files somewhere? Or do I need to rewrite my PDE build to install supportFeature from the update site as part of the product build?
Thanks very much, any response greatly appreciated.
Richard
In our Ant build, our p2 related properties are as follows:
p2.artifact.repo=../uk.ac.ed.csbe.sbsivisual.update/
p2.flavor=SBSIVisual
p2.gathering=true
p2.metadata.repo=../uk.ac.ed.csbe.sbsivisual.update/
p2.publish.artifacts=true
|
|
| |
Re: creating p2 update site for RCP [message #532833 is a reply to message #532732] |
Tue, 11 May 2010 07:01   |
Eclipse User |
|
|
|
Hi, Thanks for your reply:
- yes, build is feature based. Our product consists of our 3 features + rcp features.
- support plugin + features have updated versions.
- If I just update the feature, I can see the updated feature on the update site, but Help->check for updates produces a 'Nothing to update' dialog.
This is the procedure I do to try to test the update site.
1) Build product with all features & plugins version 1.0.0.
2) Update feature info, plugin version and feature version of support feature to 1.0.1, update product version to 1.0.1. Ensure product now requires version 1.0.1 of support feature.
3) Build product 1.0.1 with all features & plugins version 1.0.1, using the same repository.
4) Move repository to update site
5) Run product from step 1)
6) Help->check for updates allows me to update the product, but it does not install the new 1.0.1 support feature - just the product version is updated. This is what I'm stuck on.
p2.inf contains standard lines to register update site with the app:
instructions.configure=\
addRepository(type:0,location:http${#58}//www.sbsi.ed.ac.uk/ update/);\
addRepository(type:1,location:http${#58}//www.sbsi.ed.ac.uk/ update/);
Thanks again
Richard
[Updated on: Tue, 11 May 2010 07:03] by Moderator
|
|
| |
Re: creating p2 update site for RCP [message #533024 is a reply to message #532876] |
Tue, 11 May 2010 18:32   |
Eclipse User |
|
|
|
Paul, thanks for your reply - it is referenced, if what you mean by referenced is that it is declared in the product 'dependencies' tab rather than as a dependency of the 'coreFunctionality' feature. Would this make a difference?
Some progress - I thought that after thrashing around for a day or so I would start afresh, so I deleted the update site, and the repository.
This has improved things somewhat. So now, if I update supportFeature from 1.0.0 to 1.0.1, and also update the product version, then when I click 'Search for Updates' the new product version appears, with the updated 'support feature' nested inside of it, and it all updates fine.
I can live with this, but it's not ideal,as the new supportFeature can only be made available with a new version of the product. if I update supportFeature again ( 1.0.2)
and do a Feature export to the existing repository, then my RCP product still does not detect this updated feature ( although if instead of my RCP app I use Eclipse to access the feature, then the 1.0.0->1.0.1->1.0.2 update sequence works fine.
Two other uncertainties
-a ) should my repository just be a folder or an Update site project? If the latter, and I define the 'p2.metadata.repo.name=SBSI' property in my ant build script, then in the application the update site appears as '${ p2.metadata.repo.name} - http://www.updateURL'. If I just export to a regular folder then the variable is expanded correctly as 'SBSI - http:///www.updateURL'
b)Secondly, in a regular feature export using the PDE UI it is possible to set categories for exported features...is this possible through an ant script? I can't see any obvious way to do this in the p2 publisher wiki page.
Thanks !!
Richard
|
|
| |
Re: creating p2 update site for RCP [message #533707 is a reply to message #533167] |
Sat, 15 May 2010 15:34  |
Eclipse User |
|
|
|
Hi Paul,
Yes that absolutely did the trick! Don't know how I'd missed that blog.
The only thing to watch out for is that your feature has a name like:
my.project.feature
p2 will refer to it as
my.project.feature.feature.group. Otherwise following the blog instructions worked really well!
Many thanks for pointing me the right way
Cheers
Richard
|
|
|
Goto Forum:
Current Time: Sun Jul 06 13:40:43 EDT 2025
Powered by FUDForum. Page generated in 0.04320 seconds
|