/
Importing packages from the main classloader

Importing packages from the main classloader

It's possible to access classes from outside of the OSGI by declaring their packages in the org.osgi.framework.system.packages.extra framework property. OSGI creates a synthetic System Bundle which declares these packages as exports. The effect is that within the OSGI container, these packages appear as if they're natively exported by a bundle.

The org.osgi.framework.system.packages.extra property is configured within the karaf/etc/custom.properties file. A Pentaho customized version is housed with the pentaho-karaf-assembly here.

OSGI doesn't support wildcarding of packages, making it cumbersome to manage. We've pre-processing the custom.properties on server startup to provide this wildcarding functionality.

Example:
org.apache.*,org.slf4j.*; version="1.7.7"

org.apache.* will be expand out to all packages with that base, with no versioning information. org.slf4j.* will expand out with the version appended to each package

Related content

Apache Karaf environment and Assembly
Apache Karaf environment and Assembly
More like this
6.0 OSGI documentation
6.0 OSGI documentation
More like this
Pentaho's Apache Karaf Features
Pentaho's Apache Karaf Features
More like this
Deploying PDI OSGI Bundles
Deploying PDI OSGI Bundles
More like this
Writing PDI Plugin OSGI Bundles
Writing PDI Plugin OSGI Bundles
More like this
OSGI in Kettle
OSGI in Kettle
More like this