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
This commit is contained in:
Brian de Alwis 2019-11-04 18:37:46 -05:00 committed by inder123
parent 47b28d99a1
commit 521fab2dd5
2 changed files with 2 additions and 5 deletions

View File

@ -3,7 +3,8 @@ Bundle-Name: ${project.name}
Bundle-Description: ${project.description} Bundle-Description: ${project.description}
Bundle-Vendor: Google Gson Project Bundle-Vendor: Google Gson Project
Bundle-ContactAddress: ${project.parent.url} 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 -removeheaders: Private-Package

View File

@ -52,10 +52,6 @@
</archive> </archive>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
</plugin>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId> <artifactId>templating-maven-plugin</artifactId>