Eclipse PDE: what should 'categorize repository' do on an export of a deployable feature?

962 Views Asked by At

I have a category.xml file. I'm exporting a feature as a deployable feature. I've checked the 'categorize repository' box and given it a path to the category.xml file. Then I export to a directory.

As far as I can tell, this has no effect on the result. I don't see anything in the directory that uses information from category.xml. Pointing Eclipse to that directory lets me install the plugin that's part of the feature, but I see 'there are no categorized items' unless I uncheck "group items by category."

What am I missing? What else do I need to do to enable category information to end up in the exported directory?

[Update: solution from Zoltán Ujhelyi]

I hadn't put in enough information in the category. My new category.xml file looks like:

<?xml version="1.0" encoding="UTF-8"?>
<site>
   <feature url="features/com.restphone.androidproguardscala.feature_0.0.8.jar" id="com.restphone.androidproguardscala.feature" version="0.0.8">
      <category name="com.restphone.androidproguardscala.feature"/>
   </feature>
   <category-def name="com.restphone.androidproguardscala.feature" label="Android Proguard Scala cache system"/>
</site>

That ends up putting this line in content.xml:

<property name='org.eclipse.equinox.p2.name' value='Android Proguard Scala cache system'/>

Note that after you export, category.xml is in category.jar, so grep isn't going to find the text (it's compressed in category.jar).

Also notice that there's an outstanding Eclipse bug that affects categories:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=321341

https://bugs.eclipse.org/bugs/show_bug.cgi?id=359683

1

There are 1 best solutions below

1
On BEST ANSWER

I would check the precise feature versions in the category.xml. If there is a difference between the feature version number and the category version number, p2 does not find the category information during update.

If versions are fine, I would try to export the feature into a new location, and try to install from that location (sometimes updating an existing p2 repository is not bug-free).