Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Automatic Updates for a custom RCP product with Tycho build and own p2 repository(Product seems to be not included in the .p2 repository)
Automatic Updates for a custom RCP product with Tycho build and own p2 repository [message #1772559] Tue, 12 September 2017 12:00 Go to next message
Hanno Wagner is currently offline Hanno WagnerFriend
Messages: 12
Registered: April 2017
Junior Member
Hi everyone,

we want to convert a custom application, which has been developed in a plain Swing monolithic manner, into an Eclipse e3/e4 RCP application and meet several problems. Right now we despair of implementing automatic updates.

Circumstances:
We set up the project build according to this tutorial. Running from eclipse, building via Maven and deploying to our p2 Site works.
For the first steps, we switched off the old Swing code and instead included a e3/e4 dummy application which only shows a base window and has the menu options for preferences and updates, following this tutorial.
For debugging, we temporarily removed .qualifier and -SNAPSHOT parts of the artifacts.
The code is at GitHub in two special branches:
Version 2.0.0 (the one executed), also binary for linux and win.
Version 2.0.1 (the one deployed to be updated to), also binary for linux and win.

Now the problem:
When we increase the version number (2.0.0 -> 2.0.1) of bundle, feature and product, change some label in the Application.e4xmi, build, deploy to the repository, then start the old (2.0.0) version of the product (from the maven target folder) and "Check for Updates", it always shows "No updates were found in available software sites".
When browsing the update site via "Install new Software", we can see the feature (org.agentgui.feature) with the new version number (2.0.1), but trying to install it yields:
Quote:
Your original request has been modified.
"Agent.GUI" is already installed, so an update will be performed instead.
Cannot complete the install because of a conflicting dependency.
Software being installed: Agent.GUI 2.0.1 (org.agentgui.feature.feature.group 2.0.1)
Software currently installed: Agent Workbench 2.0.0 (org.agentgui 2.0.0)
Only one of the following can be installed at once:
Agent.GUI 2.0.0 (org.agentgui.feature.feature.jar 2.0.0)
Agent.GUI 2.0.1 (org.agentgui.feature.feature.jar 2.0.1)
Cannot satisfy dependency:
From: Agent Workbench 2.0.0 (org.agentgui 2.0.0)
To: org.agentgui.feature.feature.group [2.0.0]
Cannot satisfy dependency:
From: Agent.GUI 2.0.0 (org.agentgui.feature.feature.group 2.0.0)
To: org.agentgui.feature.feature.jar [2.0.0]
Cannot satisfy dependency:
From: Agent.GUI 2.0.1 (org.agentgui.feature.feature.group 2.0.1)
To: org.agentgui.feature.feature.jar [2.0.1]


But the product ("Agent Workbench") doesn't seem to be in the repository, it is not listed in the GUI and I can't find the id org.agentgui in content.xml, artifacts.xml or p2.index in the repository.

Question:
I have read somewhere that the product is only tied to one specific version of the feature, is that correct and the cause of the problem?
If so, how can we solve this, how can we include the product into the repository? All tutorials and other documentation on the web seem to assume that it is automatically included, so what do we do wrong or did we misconfigure?
Or is it possible to make the product accept other versions of the feature? I seem to remember that there might be an option for it in the product's p2.inf file (but am not able to find that info on the web again)?

Thanks in advance!

Cheers,
Hanno

[Updated on: Tue, 12 September 2017 12:08]

Report message to a moderator

[SOLVED] Automatic Updates for a custom RCP product with Tycho build and own p2 repository [message #1772979 is a reply to message #1772559] Tue, 19 September 2017 16:01 Go to previous message
Hanno Wagner is currently offline Hanno WagnerFriend
Messages: 12
Registered: April 2017
Junior Member
This really has been a pain, but it seems, that the problem is now solved, but it's not just one simple fix but a plethora of things we had to do.
So, consider this solved and I will add our solution here for the afterworld.
At first, in the tutorial is one small hint which can be overlooked quite easily, and that is to add the property "
 installMode="root"
" to the own feature like this:
   <features>
      <feature id="org.agentgui.feature" version="2.0.0.qualifier" installMode="root"/>
   </features>

Unfortunately, there is no Editor option for this (although it seems there should be one or was one earlier: https://bugs.eclipse.org/bugs/show_bug.cgi?id=429902), so you have to do it via text editor.
This option will make sure, that your feature can be updated independent from the product. The product will be "empty", the feature will be installed besides it and not underneath it (hierarchically speaking) and the product will never be updated but it's version number will always remain the same
The next thing is, to make sure to have your product composed of (Tab "Contents" in the graphical editor) only your ONE feature WITH version (e.g. 2.0.0.qualifier) and not also of the framework features.
Those (e.g. org.eclipse.e4.rcp, org.eclipse.equinox.p2.core.feature etc.) need to be added to the "Included Features" tab of the feature's graphical editor.
It can be seen here: https://github.com/EnFlexIT/AgentWorkbench/commit/1fdacfd60b90a79cb09e7ca6fd7eaa564dbefa01
The aforementioned debug branches/tags/releases have been removed now and the links are therefore broken.
The "solution" suggested here: https://www.eclipse.org/forums/index.php?t=msg&th=155943&goto=491414&#msg_491414 (leave id or version blank) won't work, because maven complains if those attributes aren't filled according to rules.
Previous Topic:Toolbar Buttons Enablement problem
Next Topic:RCP application migrated to e4 based on compatibility layer key binding is ignored
Goto Forum:
  


Current Time: Thu Sep 26 02:04:57 GMT 2024

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

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

Back to the top