The p2 site that the pluginbuilder generates has no cathegories. Because of this, when the "Group items by category" switch is checked in the update manager, nothing is shown for update. The generation of categories is controlled by the "-site <sitefile.xml>" command line argument. <sitefile.xml> can be the site, that pluginbuilder has generated.
for example the update site can be generated with cathegories with:
<java classname="org.eclipse.equinox.launcher.Main" fork="yes" timeout="10800000" taskname="p2" failonerror="true" maxmemory="256m">
<classpath>
<fileset dir="${eclipseDir}/plugins" includes="org.eclipse.equinox.launcher_*.jar, org.eclipse.equinox.p2.metadata.generator_*.jar" />
<pathelement location="${eclipseDir}/plugins" />
</classpath>
<arg line="org.eclipse.equinox.launcher.Main" />
<arg line="-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator" />
<arg line="-updateSite '${buildDirectory}/updateSite/'" />
<arg line="-site file:'${buildDirectory}/updateSite/site.xml'" />
<arg line="-metadataRepository file:'${buildDirectory}/updateSite/'" />
<arg line="-artifactRepository file:'${buildDirectory}/updateSite/'" />
<arg line="-noDefaultIUs -compress -reusePack200Files" />
</java>
Hi,
I had the same Problem (adding categories), but I used a somewhat different solution. I created an category.xml file (New -> Other... -> Plug-in Development -> Category Definition) and added the following to the 'callExternalPostBuild' Target in the customTarget.xml file.:
<!--======================================================-->
<!-- Call External post build file if available -->
<!-- ==================================================== -->
<target name="callExternalPostBuild" if="is.External.Postbuild">
<java taskname="Set Categories"
classname="org.eclipse.equinox.launcher.Main"
fork="true"
failonerror="true">
<classpath>
<fileset dir="${eclipse.home}/plugins"
includes="org.eclipse.equinox.launcher_*.jar,\ org.eclipse.equinox.p2.metadata.generator_*.jar" />
<pathelement location="${eclipse.home}/plugins" />
</classpath>
<arg line="-application org.eclipse.equinox.p2.publisher.CategoryPublisher" />
<arg line="-metadataRepository ${p2.metadata.repo}" />
<arg line="-categoryDefinition file:${buildHome}/category.xml" />
<arg line="-categoryQualifier" />
</java>
<ant antfile="${buildHome}/build-files/postBuild.xml" />
</target>
This works very well for me and my local builds.
brgds,
Thomas
Hi Thomas,
Thanks for sharing your solution. If you have a category file the PDE buidl provides an even easier solution: just set the p2.category.definition attribute.
The nightly build of pluginbuilder already contains a default category file and the property.
Thanks
Markus