Despite what is commonly believed and what I have repeated to several occasions, p2 does allow for the installation of anything, anything being for example just bundles. It just happens that today, with the practices adopted over the years, features have grown to be the primary way of delivering features.I'm now showing how to create a p2 repository whose category refers to bundles.
- Create a new feature project. This adds the category property to the installable unit, thus allowing the UI to recognize the feature as a category to be displayed.
- Create a file named p2.inf in the feature project and paste in the following two lines:
- Include the plug-ins you want to see being categorized. This is where you define what goes in the category. Each entry in the plug-ins list will be shown under the category.
- Remove everything from the build.properties included in the feature. This causes PDE to not generate a feature.jar.
- Export the feature enabling metadata generation.
You can find a zip of this example on the wiki.
Happy categorization, happy provisioning!