Community
Participate
Working Groups
Why optional import package from plugin cause creating required plug-in in feature? 1. Create Plug-in project ('plugin') 2. Create Feature project and make reference to 'plugin' 3. In Plug-in Manifest Editor at Dependencies tab add for example 'org.junit' plug-in dependency and set it as optional. 4. In Feature Manifest Editor at Dependencies tab select 'Compute' button - no 'org.junit' dependency appeared. 5. In Plug-in Manifest Editor at Dependencies tab add 'org.junit' import package and set it as optional. 6. In Feature Manifest Editor at Dependencies tab select 'Compute' button - 'org.junit' dependency appeared.
What version of Eclipse are you running on. The feature editor doesn't use the dependency calculator like the product editor, but it should still skip optional imports. Looking at the code I see a check to skip optional. org.eclipse.pde.internal.core.feature.Feature.addPluginImports(List<IFeatureImport>, List<IFeatureImport>, IPluginBase)
Was looking at another dependency bug and happened upon this one. Confirmed that optional dependencies are not added as dependencies when computing (Kepler 4.3). Closing as WORKSFORME. Create a plug-in with two required bundles, one optional one not. Create a feature that includes the plug-in Go to the dependencies page, with no existing dependencies, hit compute Result: Only the non-optional requirement will be added.