Skip to content

Commit

Permalink
Fix OSGi metadata generation to work on JavaSE < 9 (#1603)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
briandealwis authored and inder123 committed Nov 4, 2019
1 parent 47b28d9 commit 521fab2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 2 additions & 1 deletion gson/bnd.bnd
Expand Up @@ -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

Expand Down
4 changes: 0 additions & 4 deletions gson/pom.xml
Expand Up @@ -52,10 +52,6 @@
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
Expand Down

0 comments on commit 521fab2

Please sign in to comment.