on sunday I blogged about the problems with lost or wrong Categories if UpdateSites are build using PDE. Thanks to the great Eclipse Community – even on a sunday I got some comments and also tips through twitter some minutes or hours later 🙂
If you also have trouble using Categories in your Update-Site then take a look at the comments I got here.
I got also confirmation that this behaviour wasn’t expected and opened Bugzilla 309624.
For now I’m using this as workaround based on this P2 wiki page about P2 Publisher.
After generating the Update-Site from PDE I have to run two headless applications:
java -jar <eclipseInstallation>/plugins/org.eclipse.equinox.launcher_*.jar -application org.eclipse.equinox.p2.publisher.UpdateSitePublisher -metadataRepository file:/<repo location>/repository -artifactRepository file:/<repo location>/repository -source /<location with site.xml> -compress -publishArtifacts
as Source Location I can use the generated UpdateSite.
this publisher uses the generated /repository from the P2 UpdateSitePublisher and can re-use the sites.xml from PDE Update Site Project:
java -jar <eclipseInstallation>/plugins/org.eclipse.equinox.launcher_*.jar -application org.eclipse.equinox.p2.publisher.CategoryPublisher -metadataRepository file:/<repo location>/repository -categoryDefinition file:/<location with site.xml>/sites.xml -categoryQualifier -compress
The P2 CategoryPublisher modifies the generated repository.
Then I published the content of the P2 /repository to my Update Site online and now the Categories work well.
Thanks to all helping with tips.
Would be great if the P2 UpdateSitePublisher and CategoryPublisher could run as ANT tasks to avoid headless builds in this use-case, but there are only ANT tasks for the P2 FeaturesAndBundles Publisher and the P2 ProductPublisher. So I opened Bug 309663.