Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 22:53 Go to next message
Richard Adams is currently offline Richard Adams
Messages: 77
Registered: July 2009
Location: Edinburgh
Member
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 #532732 is a reply to message #532708] Tue, 11 May 2010 05:43 Go to previous messageGo to next message
T. Wilhelm is currently offline T. Wilhelm
Messages: 129
Registered: July 2009
Senior Member
Hi Richard,

you dont have to rewrite your PDE build, in our project it worked without installing features via the update site. Does your build make a deployment based on features? Actually i only know a deployment via eclipse IDE, but there i have the option wether to make a build based on features or plugins.

there shouldnt be any differences between your branding feature and your support feature. Did you update the Version of the plugin AND the support feature? In the update View, there is an option "Group items by category", did you check/uncheck this option?

Did you export your feature as "deployable feature" and categorize it? Did you export it to the correct folder which is announced in your p2.inf?

Sorry for that "simple" questions, but P2 is a very difficult thing, and i really got mad of it. Nevertheless the error is often in a detail. Its hard to help because there is no code which we can inspect Wink

Greetz
OhNo

[Updated on: Tue, 11 May 2010 05:47]

Report message to a moderator

Re: creating p2 update site for RCP [message #532833 is a reply to message #532732] Tue, 11 May 2010 11:01 Go to previous messageGo to next message
Richard Adams is currently offline Richard Adams
Messages: 77
Registered: July 2009
Location: Edinburgh
Member
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 11:03]

Report message to a moderator

Re: creating p2 update site for RCP [message #532876 is a reply to message #532708] Tue, 11 May 2010 12:39 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Who includes supportFeature? Is it just referenced from your product
definition, or does one of the other features depend on it?

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: creating p2 update site for RCP [message #533024 is a reply to message #532876] Tue, 11 May 2010 22:32 Go to previous messageGo to next message
Richard Adams is currently offline Richard Adams
Messages: 77
Registered: July 2009
Location: Edinburgh
Member
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 #533167 is a reply to message #533024] Wed, 12 May 2010 13:14 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

I asked around and found this:
http://aniefer.blogspot.com/2009/07/composing-and-updating-c ustom-eclipse.html
"So the question becomes how to allow updating sub-components of the
product without updating the product itself."

Is that close to what you're looking for?

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: creating p2 update site for RCP [message #533707 is a reply to message #533167] Sat, 15 May 2010 19:34 Go to previous message
Richard Adams is currently offline Richard Adams
Messages: 77
Registered: July 2009
Location: Edinburgh
Member
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






Previous Topic:How to access Velocity templates in a plugin
Next Topic:Progress View flickering when using group progress monitors
Goto Forum:
  


Current Time: Sun Sep 21 00:13:48 GMT 2014

Powered by FUDForum. Page generated in 0.01691 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software