orsonpdf
orsonpdf copied to clipboard
Enable OSGi and allow calling drawImage with null op like JDK does
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.
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).
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?
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