Rework BouncyCastle/OSGi integration 60/79160/6
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 2 Jan 2019 17:30:05 +0000 (18:30 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 4 Jan 2019 12:37:55 +0000 (13:37 +0100)
commit0a9ed2d5e5330a1f9fadcc70893162942c38e58e
treedc3401ccb2a33c02fd521503591c1c7c39f690de
parent99753c512182f39c0ca06393d42e44f6918b6b0d
Rework BouncyCastle/OSGi integration

We are packaging BC jars twice, once in lib/boot for the purposes
of having the provider set by karaf's Main class and second time
to expose them to OSGi world via startup.properties as normal bundles.

This is required because the boot classpath is not exposed directly
into OSGi world and thus bundles linking to BC would not be able
to find correct exports.

An alternative would be to specify all the packages through
org.osgi.framework.system.packages.extra, but that has the downside
of being static and requiring maintentance.

This patch takes the route of Framework Extension Bundles, where
it provides two fragment bundles, which attach to system.bundle,
which itself has access to the boot class loader -- hence they
can themselves contain appropriate Export-Package instructions.

We generate these instructions from upstream bundles by unpacking
their manifest and retaining only Export-Package instruction (via a
simplistic maven plugin) and feeding this as input into
maven-bundle-plugin.

JIRA: ODLPARENT-185
Change-Id: I5cbfc9a499aa117581004585f4fa5283f65a5a38
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
filter-manifest-plugin/pom.xml [new file with mode: 0644]
filter-manifest-plugin/src/main/java/org/opendaylight/odlparent/filter/manifest/plugin/FilterManifestMojo.java [new file with mode: 0644]
karaf/bcpkix-framework-ext/pom.xml [new file with mode: 0644]
karaf/bcprov-framework-ext/pom.xml [new file with mode: 0644]
karaf/karaf4-parent/pom.xml
karaf/opendaylight-karaf-resources/pom.xml
karaf/pom.xml
odlparent-artifacts/pom.xml
pom.xml