Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
karaf-1.4.0
-
None
Description
I've been looking into rebasing an existing test on the new org.apache.felix.karaf.testing.Helper class, but I don't think it goes quite far enough in imposing the karaf runtime environment on pax-runner. Specifically, just pulling in the config.properties settings related to the system.packages doesn't stop pax-runner generating a system packages list with its own notion of what packages are appropriate for the current JRE version.
So for Java6 we end up with problematic entries like javax.xml.ws*, javax.activation etc. which cause trouble for any bundles doing version-constrained imports of these packages (because equinox assigns "0.0" as the version for system packages).
What's needed, I think, is for the Helper to generate a pax-runner execution environment file, named say target/paxrunner/platform/ee/karaf/jre-1.
{5|6}.profile, and containing the correct set of system packages for karaf (i.e. the org.osgi.framework.system.packages property read from the config.properties with the jre-1.{5|6}variable substituted in). The Helper should also set rawPaxRunnerOption("--ee", "file://./target/paxrunner/platform/ee/karaf/jre-1.
{5|6}.profile") as one of the default options.
Feedback welcome if I'm on the wrong track with this. But if there are no objections, I'll go ahead and code this up & then submit a patch.