rdf4j icon indicating copy to clipboard operation
rdf4j copied to clipboard

Use Export/Version on package-info to describe the OSGi meta-data

Open laeubi opened this issue 1 year ago • 4 comments

Thanks for submitting this @stbischof. Could you please also log an issue in our tracker that describes this enhancement, and link it to your PR? Also, given that this is an enhancement rather than a bug fix, if would be good if you could rebase this against the develop branch.

Originally posted by @jeenbroekstra in https://github.com/eclipse/rdf4j/issues/3736#issuecomment-1073126062

laeubi avatar Jul 25 '22 14:07 laeubi

@laeubi can you give some background on what this improvement actually does? I don't know a lot about a OSGi - how does this improvement benefit developers who use OSGi?

abrokenjester avatar Jul 29 '22 23:07 abrokenjester

@laeubi maybe you should copy the MANIFEST.MF file that is generated here. There you will see that we mainly generate manifest-entrys that describe whick packages are exported (for externat use). without this enty an osgi framework will not be able to load the jar and/or gives other classes that import rdf4j access to not exported classes..

stbischof avatar Aug 01 '22 10:08 stbischof

I have recently seen https://github.com/eclipse/rdf4j/commit/eb239114cc33fab91baa67007ae06317ab9416cf (revert incompatible changes to interface) The version annotations, together with BND-Baseline plugin can be used to enforce Semantic Versioning 2.0.0, so maybe this would be interesting for RDF4j even though it does not use OSGi directly (yet)?

laeubi avatar Aug 09 '22 10:08 laeubi

I have recently seen eb23911 (revert incompatible changes to interface) The version annotations, together with BND-Baseline plugin can be used to enforce Semantic Versioning 2.0.0, so maybe this would be interesting for RDF4j even though it does not use OSGi directly (yet)?

We actually use the japicmp maven plugin to verify semver compliance in our code base.

I wouldn't be against using OSGi for this (and other) purposes, but nobody has ever been able to satisfactorily explain to me what OSGi is for, and what benefits adopting it would give us. Then again the problem has always been that there's really no one with OSGi expertise on our core team, so if you're interested in being our resident expert, I'd love to hear more :)

abrokenjester avatar Aug 19 '22 23:08 abrokenjester