Add support for building multi-release jars (automatic!)#5359
Add support for building multi-release jars (automatic!)#5359laeubi wants to merge 2 commits intobndtools:masterfrom
Conversation
|
I have adjusted the example here to reflect the changes, the |
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 <[email protected]>
6c432c0 to
e63ee71
Compare
|
I think the direction here is good. We probably need some more multi-release bundle generation tests before it can be merged though. |
Can you suggest a test-case that might be adapted for this purpose?
According to my tests (see attached generated bundle) it simply "works", e.g. I see |
This changes enable BND user to set Multi-Release: true in a BND file and then creates a bundle that conforms to the OSGi Multi-release JAR specification Signed-off-by: Christoph Läubrich <[email protected]>
I have added now a test here: bnd/biz.aQute.bndlib.tests/test/aQute/bnd/osgi/AnalyzerTest.java Lines 24 to 53 in 51a4947 |
|
I will take over this PR |
This is based on:
so to see the actual changes from this PR simply select the last commit on the review tab.
an allows to specify
Multi-Release: truein a BND file to instruct BND building an OSGi Multi-Release Bundle based on the detected versions.
@timothyjward this also includes fixing general processing of BND in cases where multi-release is off, and methods for
Jarto put versioned resources / supplemental manifests. If you think it helps, both aspects could be split into separate PRs as well.This will fix #5346