Skip to content

Enable OSGi and allow calling drawImage with null op like JDK does#1

Open
makusuko wants to merge 2 commits into
jfree:masterfrom
FluiditLtd:master
Open

Enable OSGi and allow calling drawImage with null op like JDK does#1
makusuko wants to merge 2 commits into
jfree:masterfrom
FluiditLtd:master

Conversation

@makusuko
Copy link
Copy Markdown

No description provided.

@jfree
Copy link
Copy Markdown
Owner

jfree commented Dec 7, 2018

I've separately committed a fix for the ImageOp issue. I want to understand the impact of the OSGi change, so I'll need to research that a bit more.

@makusuko
Copy link
Copy Markdown
Author

Thanks!

The change related to OSGi only adds a few new items to the META-INF/MANIFEST.MF file of the resulting jar. Otherwise the resulting jar is identical and everything works the same in any Maven or Gradle projects using the dependency. Only difference is, that OSGi aware applications can now use the jar as OSGi module (i.e. the bundle plugin exports the Java packages implemented in the library).

@makusuko makusuko closed this Dec 10, 2018
@makusuko makusuko reopened this Dec 10, 2018
@jfree
Copy link
Copy Markdown
Owner

jfree commented Dec 12, 2018

OK, thanks. My next question is how to combine your change along with another request to add an automatic module name to the manifest file in the jar? I'm not so knowledgeable in Maven, but your change uses a different plugin to create the jar file so I'm not sure how to go about this.

Is there an alternative way to provide the osgi info in the manifest file?

@makusuko
Copy link
Copy Markdown
Author

The bundle packaging together with the bundle plugin automatically creates all the necessary OSGi headers based on the generated classfiles. The other way is to manually create the OSGi headers and to add them to the manifest in the jar plugin. Then of course, they must be kept up-to-date manually.

Changing the project packaging from jar to bundle and adding the bundle plugin won't break or change anything, except it adds the OSGi headers - otherwise the project keeps working the same and can be used as a traditional jar dependency.

The bundle plugin comes from Apache Felix project, is standard stuff on Maven Central repository and it is being used by a lot of projects - especially those coming from the Apache project: for example see https://mvnrepository.com/tags/bundle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants