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
Add support for reading Multi-Release-Jar content #5357
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I think the direction is good, with just a few small fixes required to match spec behaviour.
I would be interested in seeing the aQute.bnd.build.model.EE
updated to provide access to the release
int for each EE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have applied the suggested fixes and enhanced the test-case.
If I understand the code correctly, this is simply |
At this point I'm happy and think this is worth merging - @bjhargrave do you have anything to add? |
Yes, although the following isn't exactly readable...
|
I think it won't be a problem to add a new "getRelease()" method here, but lets see first if there is other to do. |
thanks @timothyjward for the review, the Ci is also happy! |
I have opened for this as it seems to be a valid enhancement regardless of MR support... |
@bjhargrave I have now created two PRs based on this to show how one can uses the Multi-Release-Jar support to:
I hope this i sufficient to review this PR and decide if changes are required before this can be merged. FYI @stbischof @rotty3000 |
The following comment is wrong. The version should be 17 for the third check in the test. |
This adds methods to the Jar class to read versioned content of a multi-release jar for the following cases: - get a resource or a map of resources for a given release version - get a merged manifest according to the OSGi specification - get module name/version for a given given release version - list all contained release alternative versions Beside this a unit-test is added to cover these new functions. Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
Fixed! |
@bjhargrave - I think that this should be merged, can we go ahead? |
@rotty3000 can you maybe help here? Its about a full month now with no feedback at all ... :-\ |
I am still working on ideas about mrjar support in a side branch based upon the narrative in https://github.com/bndtools/bnd/wiki/Multi-release-JAR-support-design-discussion. Sorry it is taking awhile but have other items to also work on. Until I have a better idea on how we should handle mrjars, I don't want to merge this partial proposal. |
So now after about half a year later is there any decision / progress on this? |
@laeubi can you contact me via Peter.Kriens@aQute.biz? I'd like to have a zoom call to understand all this. I've kept myself out of this discussion (I am not convinced multi release jars are even remotely a good idea, they seem to suffer a lot of accidental complexity) but now with BJ out of the loop I need to get this of the PR list. So if you can contact me, we setup a call. |
@pkriens I send you a mail, I think the main point is not if one likes MR or not, that's not a desiccation made by the tool, I just wanted to support it because more and more libs are start using this and it is part of the OSGi Spec for many years, but yes it might not be used much. That's also why I aim for a quite basic solution as a first step and from my testing with this it works quite good for the rare cases where I needed a MR jar (mostly to add OSGi headers to a 3rd party library). |
I will take over this PR |
This adds methods to the Jar class to read versioned content of a
multi-release jar for the following cases:
Beside this a unit-test is added to cover these new functions.
Signed-off-by: Christoph Läubrich laeubi@laeubi-soft.de