Create Update Sites
recently I built some update sites. this is an easy process using PDE:
1. create a new Update Site Project:
2. add some Categories and add features into the Categories:
3. Synchronize and Build All:
4. Export all into File System and transfer it to the Web
…and you’re done
Make a test if your site is reachable and works – and the suddenly those things can happen:
5. Category missing
Some or all defined Categories or included Features are lost.
You have to uncheck “Group by Category” to see all included Features, but the you miss the Category Comfort.
What’s the reason – who eats the Categories ?
I tried some tips I found, but nothing helps. Sometimes Categories work, sometimes not.
I know, there are many Update Sites out there where I always have to uncheck the “Group by Category” – perhaps the same reason ?
Today I found a newsgroup entry from 2008: Problem to create Updatesite. And I tried the solution:
Remove “artifacts.jar” and “contents.jar” from your Update Site – then you’ll see the Categories you defined.
uuups: this works.
hmmm… if I want the Categories I have to remove P2 Metainformations ?
all my tests done with Helios SDK M6.
perhaps anyone has an idea how to get P2 informations and Categories working together – or should I open a bug ?
ekke







I’m not exactly sure, but maybe this behaviur is related to the fact that the Update site project builds both P2 and classic update site, and there is some kind of error.
Yes, I know thats the most comfortable solution for creating update sites, but I don’t have any solution.
But I don’t have any inside experience with P2, so I cannot really tell whether its a bug or a feature.
Hi,
I think you need to categorize your repository afterwords. See http://eclipsesource.com/blogs/2009/05/08/categorize-your-repository/ for a description. You can use your existing site.xml as a category definition file, so you don’t need to repeat the steps described to create one.
Cheers,
Christoph
just got from twitter:
@tmseidel had similar problems with pdebuild, category publisher of p2 solved my problems, see http://to.ly/2U5x
—
so – using headless applications it should work, but I still don’t understand why it doesn’t work hitting “Build All” from PDE.
ekke
Hi ekke,
Had similar problems with categories and update sites on Galileo. Here is what I do now.
# Repos are composite repositories.
1. Children repos are in subdirectories one for each product or feature built. They are named
1. product-milestone
2. features-milestone
3. For every milestone release there will be at least one child repo
4. Just edit the xml files to add new children as the new milestones are added.
1. compositeArtifacts.xml
2. compositeContent.xml
2. Categories are a seperate child repo
1. Use a hand written content.xml to specify generic categories
2. Will not require re-editing
# Advantages
1. Builds that are broken can be easily removed
2. Keeps size down
3. Categories are always there
cheers,
John
oops sorry for the ugly format. Just indent the logical subpoints.
thanks to all for your detailed informations and tips.
I’ll do some tests next days and see what I’ll use in my projects.
ekke
I had a similar problem when exporting a feature with p2-metadata. Even though I specified a category.xml, the resulting repository was category-less.
What worked for me was the following:
put a p2.inf next to the feature.xml with the following contents:
properties.1.name=org.eclipse.equinox.p2.type.category
properties.1.value=true
Please open a bug report and attach your site and everything else that can help us reproduce this problem. This behaviour is definitely *not* expected. As for the workaround of deleting the artifacts.jar and content.jar, it is absolutely *not* something to recommend. It forces p2 to run in backward compatibility mode for this particular site, which results in a degraded experience for your users.
Pascal,
of course I don’t want to fall back in pre-p2 times 😉
thats the reason of my blog post. now I have some “real” workarounds to try out and I know that its not expected behaviour.
will try to create a small easy-to-reproduce updatesite and open a bugzilla.
thx
ekke
Pascal, I filed a bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=309624
while preparing the testcases I found out, that it happens if you rebuild sites –
even into an empty sites project where only the sites.xml is there.
explains why it sometimes works and sometimes not
ekke
Pingback: Who eats the categories from update-sites -> part 2: workaround « ekkes-corner: eclipse | osgi | mdsd | erp
I struggled with the same issue at one point. When I finally did come up with a solution, I added it to the FAQ:
http://wiki.eclipse.org/Eclipse_Plug-in_Development_FAQ#Release