From 521fab2dd5e829b51cff6813d0b5405d4ab2d1ee Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Mon, 4 Nov 2019 18:37:46 -0500 Subject: [PATCH] Fix OSGi metadata generation to work on JavaSE < 9 (#1603) * Explicitly specify `Require-Capability: osgi.ee` to require 1.5+ Specifying disables bnd's auto-generated value which is determined from the minimum versions of the .class files, including `module-info.class` * Drop JavaSE-1.5 since that boat sailed a long time ago * Drop unused org.apache.felix:maven-bundle-plugin plugin --- gson/bnd.bnd | 3 ++- gson/pom.xml | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/gson/bnd.bnd b/gson/bnd.bnd index c98fcfd3c2..57a8657fd8 100644 --- a/gson/bnd.bnd +++ b/gson/bnd.bnd @@ -3,7 +3,8 @@ Bundle-Name: ${project.name} Bundle-Description: ${project.description} Bundle-Vendor: Google Gson Project Bundle-ContactAddress: ${project.parent.url} -Bundle-RequiredExecutionEnvironment: J2SE-1.5, JavaSE-1.6, JavaSE-1.7, JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7, JavaSE-1.8 +Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))" -removeheaders: Private-Package diff --git a/gson/pom.xml b/gson/pom.xml index a292d96aaa..e4b7b45f81 100644 --- a/gson/pom.xml +++ b/gson/pom.xml @@ -52,10 +52,6 @@ - - org.apache.felix - maven-bundle-plugin - org.codehaus.mojo templating-maven-plugin