Wrapping JARs in Bntools

In my previous post I showed how to use a non-OSGi JAR. A question was what the purpose of this?

In OSGi you can wrap bundles very easily by including the whole bundle in one fell swoop.

-includeresource \

The @ function takes a file path and unrolls the JAR in the bundle. I.e. it copies all the entries in that JAR in the bundle you’re bundle. Afterwards it will calculate imports and exports. The ${repo} macro takes a Bundle Symbolic Name and an optional version and provides the file path.

1 Like

Great! Wrapping and including bundles since years. But there are always new gems - $repo macro inside bnd🤩
Thx for sharing!