Open Community Experience (OCX)

Bndtools 7.2.0 and beyond: Two years of innovation in the OSGi tooling ecosystem

15:08 · 21 Apr 2026 – 23 Apr 2026 · YouTube

About this talk

This talk focuses on BND, a toolset primarily for generating OSGi bundles and manifests from Java class files. The speaker, Christoph Rugar from Sonus T, delves into new features and improvements since the previous conference, including updates to the BND tools in the Eclipse IDE. He discusses enhancements such as the effective view, which provides insight into the configurations and dependencies seen by BND, alongside features like the BND Run Analyzer for cleaning up unused dependencies. The speaker also highlights the integration of new Java versions and improvements in package substitution, as well as the introduction of features such as a dev server for rapid application development. Furthermore, he emphasizes the importance of community contributions to the ongoing maintenance and development of BND.

Full transcript

[music] >> Welcome to my talk about B and D and B and D tools and what happened since the last conference in Mainz. Similar to the talk before, thanks. Yeah, it's going to be a speed run over yeah, the main features I think are worth noting. I'm Christoph Rugar. I work for Sonus T. We are a SaaS no code platform where e-commerce people can connect various systems

without coding and we're using OSGi basically since 2010. And it's a pretty good fit for what we're doing. On GitHub, that's my handle. You can find me there. So quick agenda, give a quick intro and then I go over the various points. What is B and D? Quick hands who has worked with B and D or knows what it is or has any any touch. Okay, a

few ones. So B and D is a is a tools is a set of tools it's a lot of things but mainly it's a library for generating OSGi bundles and the manifest. So by analyzing Java class files. Usually you in B and D you have those configuration files, the B and D files where you can yes con- control how the manifest is generated. Can imagine it like

a template language. it creates a jar file which has a proper manifest in it with all this stuff you see there which you would normally have to create by hand if you wouldn't have a tool like B and D. But it's also built tool. Not many people know about that. We are using that. So called B and D workspace model and yes basically a folder where you

can organize your and build it into into executable products. So when we talk about B and D um we basically have the B and D or B and D lib, uh which is the core engine. Uh you can also use it as a jar in your own project. Eclipse PDE does that for manifest generation. Um you have the CLI, which is a command line tool. You have

BND tools, which I will talk about in a second, which is the Eclipse plugin. And you also have plugins for Maven and Gradle and whatnot. So, um yeah. What happened in the Eclipse IDE plugin BND tools. One of the cool things is the effective view. When you worked with BND before, you had this BND editor, which is a yeah, text editor basically for writing those BND configuration

files. And it has some features like syntax highlighting and stuff. What's the problem? What you see is not what you get really. So, there's lots of stuff happening in the background. There are includes, there's inheritance going on. And there are default values, uh but you don't see >> [clears throat] >> The effective view is basically a um shows you what BND sees, which is really helpful. You

see the resolved values, you see where from which configu- from which other files something is coming from, and you also see errors. Um you also have a nice source view, um which is quite handy for copy-pasting uh resolved BND run uh resolved BND file. So, this is a very valuable tool for development because you finally see what BND is seeing. Um the repository browser. It's a it's

a view inside BND tools, which shows you all your repositories. One of the cool things we added is um that the Maven BND repo, which is yeah, Maven based repository, now can be maintained as a POM XML file. Before, you had a flat file, uh which one Maven coordinate per line. It's quite It's nice and compact. Problem is tooling doesn't understand it um like Dependabot. So, this

is quite cool. We can now maintain our dependencies in a POM and uh Dependabot can automatically update them. The BND cache repo um it was a hidden before, but it was there and it was considered in resolve process and everything. It's now shown, which helps you to know that it exists and uh what's going on. Yeah, we also added you can refresh the cache, which is sometimes

necessary um yeah, if your local uh M2 repo is messed up for some reason, you can re-download uh a dependency. We added some performance improvements, the memory fixed some memory leak, and yeah, the last cool thing which just recently got added or will be available with the next 7.3 is the P2 feature support. So, if you're working with P2 repositories uh yeah, for Eclipse applications, then um

you now can use features um which can include other features and bundles, which is quite nice. Before, you just had the bundles there. Um in the upcoming 7.3 of BND um we added a bundle graph view, which is a nice uh visual way of um exploring your dependencies uh or your bundle your bundles. Um it helps to understand what's going on. Um it helps to uh with

debugging. For example, I used it to identify um that we're using a dependency which I didn't expect in some kind of way. So, just makes things visible, yeah. So, the other tool we added is the BND Run Analyzer. It's a tool for cleaning up uh stuff which is not used. Um you can basically select all your BND run files, right click, analyze BND run, and it checks

against all your repositories and your repository viewer, uh, and identifies any dependency which is not used by any BND run file. It's just good to clean up, um, uh, yeah, regarding compliance, important to not have stuff lingering around which is not used. Um, yeah, this is also pretty helpful to keep your stuff clean. Some quality of life fixes, um, when you're working with BND files, you have

you can include other BND files, and sometimes you want to override, um, a value from an included file. When you write it like that on the top, I don't know if you can see it, um, BND now gives you a warning, um, that you put a little tilde in front of that, and then your overwritten value, um, takes effect. Um, it's a little annoying thing which BND

does, but now at least you know at least you noticed it. Um, yeah, the BND editor tool tips now, um, link directly to the uh, to the docs, which is quite handy to quickly check something uh, if you want to find out about some instruction or macro. And if you're working with sub bundles, BND now has better, um, error reporting and, um, shows more information in a

marker in which sub bundle something went wrong, uh, which it didn't do before, so you always had to guess and figure out what what was happening. One of the maintainers of BND, uh, tool, Scott Lewis, um, he is the maintainer of, um, the Eclipse Communication Framework. He added, um, support for that, uh, into mainly, um, some nice, uh, templates and wizards, um, to set up projects, um,

his main specialty is OSGi remote services, uh, where you have where you can build, um, client and server, uh, stuff with OSGi bundles, and just recently also, um, added stuff for MCP, which is interesting for people want to want to build, um, AI applications with the, uh, MCP protocol. And it basically helps you to set up, uh, working project, which already is this and you could start

playing around. If you're interested in this, um, go to the ECF, um, project and, yeah, start playing around with it. What happened in BND Tools, um, one of the main tasks, um, of BND maintenance is, um, adding support for new Java versions. Uh, we have 24, 25, and 26, too. why is it important for BND, uh, with basically, it means telling BND the Java package or the

packages which belong to the JDK, so BND can use that information to create better manifests, more correct ones. There was also something added, um, so that BND now detects, um, the packages better, uh, when you use proxies, uh, like this. So, there were cases where BND didn't couldn't really follow, uh, that and didn't detect some packages. Now, um, there were improvements, so your manifest import packages, yeah,

contain more and more precise information. So, BND can also has a P2 exporter now, so basically, you can create P2 repositories with it, which are properly signed and have checksums. And, yeah, as a proof of concept, where BND or BND Tools used it itself to to create, yeah, to create the P2 repository which you basically install in Eclipse when you install BND tools from the marketplace. Yeah,

okay. Next topic, quite complicated, but I wanted to put it out there because it might be interesting for library authors which are not that versed with OSGi. So, OSGi has a mechanism called package substitution. That means for each export package in your manifest, it automatically BND automatically creates an import package. With this new instruction no substitution true, you can disable that behavior. Um there were ways before,

but they were error-prone because you could forget it. So, what's the problem with with this package substitution? Package substitution is a mechanism for very specific um corner cases OSGi use case, and um if you don't know what you're doing, it could lead to hard-to-debug resolution errors. Um I think uh Ed uh has had lots of pain with it. Um so, that was also what we uh one

of the cases why we created that. So, if you're a library author and OSGi is not your thing, just put that to true, and um it will probably make life easier because 90% or 99% of the people don't have that package substitution use case. yeah, makes makes it easier, and maybe in the next major version we think about making that the default. Yeah, there were some improvements

on JUnit. Um JUnit 5 support, there was a problem in the earlier version that you had to pin um your JUnit to a maximum version which was not the latest because BND couldn't handle it. Now, I think we are use the latest JUnit 5 version. Unfortunately, not JUnit 6. That's a bit of work if anybody wants to contribute and has JUnit 6 knowledge, you're welcome. Um for

people who are using declarative services DS BND was a bit sloppy before and created invalid service descriptor files if you didn't pay attention and the problem with that was it only showed up at runtime. So, at runtime is always too late as we know. We want to see it as early as possible. So, now BND is a bit stricter with the validation. For example, if your Yeah,

if you don't have a public no argument constructor or you're missing activate annotation or if you have a an inner class which is not static now BND complains and tells you, "Hey, it should be like this like this or that." Okay, last 2 minutes. Um BND CLI the command line tooling there was also some work. So, BND helps you to get up set up a project more

quickly now on the command line. Um so, you could for example do BND at to create a workspace folder with a right structure and then BND has something called fragment templates which is little snippets you to assemble your workspace. And you could say BND fragment it gets you a list of available templates provided by BND tools. And for example, we have one which is the demo web

app and it creates you a folder to get started. And then the new thing is an experimental feature we call the dev server. Um you can say BND dev, pointed to BND run file, and it starts up a server with a with a running web application, and you can go to any editor, make Java changes, it automatically recompile, the reinstalls, and so, yeah, started very quickly to

play around with with anything OSGi related. Same template fragment mechanism is also available in BND tools since Yeah, since 2 years now. Um where you can do the same thing a project. Yeah, finally, BND has Gradle line support. And for those who didn't know, it's also possible now to build BND workspaces with Maven, who prefer the Maven world instead of the Gradle world. Thanks to Eclipse Tycho,

there's a pretty neat POM less integration where you just basically add a small configuration file, and it works out of the box. cool, I stayed in time. Thanks. Yeah, that's it. Those are the URLs. BND always needs new committers. The old guys basically retired. I'm one of the new maintainers together with Peter Kirchner. And the project is more than 20 years old. Um it's it's used by

a lot of um projects to generate the manifests. Most people probably don't know that. And yeah, we always need new new people to help out. Thank you. >> [music]