Starter situation (without any error):
Now I make bundle B a fragment of the bundle A (fragment-host) adding the directive Fragment-Host: org.apache.xmlbeans in the MANIFEST of the bundle B
After this change there are NO errors in the MANIFEST.MF of all the bundles (A,B,C) but in the classes .java of the bundle C I have the compile error: "The import com.prova.xsd.config cannot be resolved" associated to the import at the head of the file .java.
What is the problem? How can I fix it?
Thanks a lot,
Andrea
You need to add "Eclipse-ExtensibleAPI: true" to the Manifest of your host plugin A.
From Eclipse Help: OSGi Manifest Bundle :
The Eclipse-ExtensibleAPI is used to specify whether a host bundle allows fragment bundles to add additional API to the host. This header should be used if a host bundle wants to allow fragments to add additional packages to the API of the host. If this header is not specified then a default value of 'false' is used. Note that this header is only used by tooling (PDE) to construct proper class paths for building. The runtime does not use this header at all. At runtime a fragment is always allowed to add additional packages, classes and resources to the API of the host. The Eclipse-ExtensibleAPI header must use the following syntax:
Eclipse-ExtensibleAPI ::= ( 'true' | 'false' )
The following is an example of the Eclipse-ExtensibleAPI header:
Eclipse-ExtensibleAPI: true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With