I’ve been working on a set of tools for using bnd in bazel and I am posting to solicit any advice, interest, or existing work that the bnd community sees as fitting the bnd workflow. Searching the discourse shows no results for the name bazel.
What works in my own setup?
- You can “OSGI-ify” your
java_library
targets via abnd
rule. This bnd rule is open-ended but forgoes the property file, for now. - You can group your bundles into bundle groups via the
bundle
target. - You can create a launcher with a list of bundle groups but there is no useful rule for that (yet).
What doesn’t work?
Everything else. No real bnd workspace usage or integration, no biz.aQute.bnd.Launcher usage, baselining, etc.
Additional thoughts:
I see two separate use cases here:
- Projects who want to add OSGI metadata to their existing libraries being built via Bazel (Guice, Protobuf)
- People who want to use OSGI as a major layer of their project but with bazel as the build tool (Me!).
Existing work
I’ve removed the links due to limits of my new account but they are all on github.
- google/guice has an osgi_jar rule that is not touched.
- hsyed/osgi_rules on github is a POC that has not been touched in 8 years.
- protocolbuffers/protobuf has one under java/osgi/osgi.bzl but it is unclear to me if it is being used.
- b0inbot/atosgi is what I have been working on.