Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor OSGi metadata issues caused by upgrade to bundleplugin 3.5.0 #1173

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,9 @@ See the Apache License Version 2.0 for the specific language governing permissio
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.5.0</version>
<version>5.1.2</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the meantime 5.1.8 was made available.

<configuration>
<excludeDependencies>jsr305</excludeDependencies>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removed the version range from the Package import javax.annotation;version="[3.0,4)", which is great because one does not need the jsr305 in an OSGi runtime anymore.
Nevertheless there is still the Import-Package javax.annotation (without version range) remains.
If the Nullable annotation from jsr305 is really not necessary at runtime I suggest to completely remove the import of the javax.annotation package, by adding a negated pattern to the Import-Package element.

If you are interested, I can provide a PR to change to that suggestion.

<instructions>
<module>com.google.inject</module>
<_include>-${project.basedir}/build.properties</_include>
Expand All @@ -351,7 +352,7 @@ See the Apache License Version 2.0 for the specific language governing permissio
<Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
<Import-Package>!com.google.inject.*,*</Import-Package>
<_exportcontents>!*.internal.*,$(module).*;version=${guice.api.version}</_exportcontents>
<_versionpolicy>$(version;==;$(@))</_versionpolicy>
<_consumer-policy>$(version;==;$(@))</_consumer-policy>
<_nouses>true</_nouses>
<_removeheaders>
Embed-Dependency,Embed-Transitive,
Expand Down