Hi all,

Recently, I had to build a product consisting of bundles only and was quite 
surprised to see that the described bundles were not included as requirements 
of the result product IU, published in the target p2 repository. After a debug 
session I found out that the "problem" was caused by the 'useFeatures' 
attribute in the .product file. It turns out that no bundles are considered as 
requirements of the product IU as long as the value of this attribute is 
"true", even if there are such bundles described in the product file.

The interesting point for me here is the way this attribute's value is 
interpreted (the programming logic can be found in 
org.eclipse.equinox.p2.publisher.eclipse.ProductAction.createRootAdvice(), as a 
reference):
-       If 'useFeatures' is "true" then only the features described in the 
product file are included into the product; described bundles, if any, are 
ignored
-       If 'useFeatures' is "false" then only the bundles described in the 
product file are included into the product; described features, if any, are 
ignored
-       If the attribute is not defined in the .product file then its value is 
assumed to be "false" and we arrive at the case above

So it seems to me that there is no feasible way to publish both features and 
plugins in the same product. So far, I couldn't find any meaningful 
documentation about the attribute's semantics (aside from the javadoc for 
IProductDescriptor.useFeatures() which simply says that this flag "Specifies 
whether this product was built using features or not" ) to understand why it is 
so and whether it is intentional. Can anybody explain what is the rationale 
behind this behavior ?

Thanks and regards,
Shenny

_______________________________________________
p2-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/p2-dev

Reply via email to