Community
Participate
Working Groups
Build Identifier: 0.14.0-SNAPSHOT When a bundle depends on jdk packages, such as sun.* or com.sun.*, it is common to create an extension-bundle to export these system packages. This is done by creating a bundle fragment with a "Fragment-Host: system.bundle; extension:=framework", which exports the desired packages. When building with tycho, if a bundle's manifest defines a Bundle-RequiredExecutionEnvironment, it does not seem that the compiler takes into account the packages defined within these extension bundles. Dependency resolution for the bundle's import-packages does work when an extension-bundle is present in the build target platform. This was tested by building without the extension-bundle in the build target platform, and an build error occurs saying that the import, like com.sun.net.ssl.internal.ssl, could not be satisfied. When the extension-bundle is included in the build target platform, the dependency is satisfied, but the compiler fails saying there is an Access restriction for com.sun.net.ssl.internal.ssl. A test project will be attached to demonstrate the problem. Reproducible: Always
Created attachment 208737 [details] Test Project demonstrating the problem
Can you point me at any documentation (OSGi specs, preferably) that explains expected behaviour of "Fragment-Host: system.bundle; extension:=framework". This will require special handling in tycho-compiler-plugin and I need to understand the problem before I can implement a solution. Another possibility is to provide a way to disable compiler bootclasspath access rules, but this is obviously suboptimal.
I believe it is defined in section "3.15 Extension Bundles" of the core osgi spec. http://blog.meschberger.ch/2008/10/osgi-bundles-require-classes-from.html is a good blog post that explained it when I was looking.
*** Bug 369187 has been marked as a duplicate of this bug. ***
I wonder if bug 369880 may be related. This one is about an equinox runtime issue but the circumstances (framework extension fragment with/without BREE) seem similar.
I am having difficulties getting provided example project compiling in eclipse workspace. Does PDE support extension:=framework ?
The extension bundle works in the PDE as part of a larger internal project I am working one, so I will have to spend some time to figure out why the simple project is not working.
Should be fixed now. http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=a4e844502a489038dae97cd8613b7d0904c3a5ea. I am still curious to see how this works in PDE.