From 596d86e196b70f17dae461d226633bc6d5334a57 Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Thu, 27 Aug 2020 10:27:01 +0100 Subject: [PATCH] Update to latest version of bnd-maven-plugin This version has a couple of advantages: 1) It is aware of module-info.class files, which means we don't need to manually override the "Require-Capability" header. 2) External packages used by reflection are now detected, i.e. the "sun.misc" package is now added to the "Import-Package" header. This is manually given optional resolution since it is obviously not present on all JVMs. 3) It also introduces some new useful OSGi headers: - Bundle-DocURL (overriden with correct URL for manual) - Bundle-License - Bundle-SCM This change also removes unnecessary mention of the felix bundle-plugin in the pluginManagement section of the parent pom. Signed-off-by: Mat Booth --- gson/bnd.bnd | 3 ++- gson/pom.xml | 2 +- pom.xml | 6 ------ 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/gson/bnd.bnd b/gson/bnd.bnd index 57a8657fd8..5ed1a0dddd 100644 --- a/gson/bnd.bnd +++ b/gson/bnd.bnd @@ -3,8 +3,9 @@ Bundle-Name: ${project.name} Bundle-Description: ${project.description} Bundle-Vendor: Google Gson Project Bundle-ContactAddress: ${project.parent.url} +Bundle-DocURL: ${project.parent.url}/blob/master/UserGuide.md Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7, JavaSE-1.8 -Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))" +Import-Package: sun.misc;resolution:=optional,* -removeheaders: Private-Package diff --git a/gson/pom.xml b/gson/pom.xml index cf32962ad0..c5d170b517 100644 --- a/gson/pom.xml +++ b/gson/pom.xml @@ -34,7 +34,7 @@ biz.aQute.bnd bnd-maven-plugin - 4.0.0 + 5.1.2 diff --git a/pom.xml b/pom.xml index 1fb47fcde4..54373f9e9a 100644 --- a/pom.xml +++ b/pom.xml @@ -103,12 +103,6 @@ org.apache.maven.plugins maven-jar-plugin - - org.apache.felix - maven-bundle-plugin - 3.3.0 - true -