Summary of Problem:
I cannot use all of the plugins from a p2 Software Site ( = Updatesite ) as dependencies. They are listed in the target platform with a purple icon and they do not appear in the plug-in selection list when trying to add as dependencies to a MANIFEST.MF file.
What's the reason and what can I do to use the plug-ins as dependencies?
Details:
I am having an Eclipse Plugin project which uses a target platform defined by a target definition file:
With the target definition editor file I have added a "Software Site" hosted on a corporate nexus:
In the 'Add Software Site' UI I selected all the available bundles. ( The Software Site consists of a p2 repository which I have created myself via p2-maven-plugin). Among others the Software site contains the plug- ins slf4j.api slf4j.simple.
I checked the availability of the plug-ins by opening the target definition file in the corresponding eclipse editor and klick on "Show location content". The plug ins mentioned abover are listed:
Now I want to use the plugins as dependencies in a PDE plug-in Project. - In the Manifest editor I go to 'dependencies' tab, klick 'Add' and search for slf4j.
Problem: In the 'Matching' items list , only slf4j.api does appear. slf4j.simple does not appear.
What do I need to do to use slf4j.simple as a dependency?
( According to this stackoverflow answer. The purple icons are Fragments - not sure what that means )
You can't add fragments as dependencies. A fragment is just an extra piece of code for the fragment's 'host' plugin. They often include code which is only required for a particular platform. Fragments don't provide any additional APIs.
You just specify the host plugin as the dependency and the fragments will be included.