bnd, via the bnd-maven-plugin
, is the tool we use to generate the OSGi metadata for our bundles. It is a powerful tool and the reference documentation from https://bnd.bndtools.org/ is comprehensive.
This page documents how to solve certain problems that occur from time to time in Sling and whose solution is not always obvious.
Inlining a class from a different bundle
Use the -includeresource
instruction pointing to the class file as included in the jar, e.g.
-includeresource:\ @oak-lucene-*.jar!/org/apache/jackrabbit/oak/plugins/index/lucene/util/LuceneIndexHelper.*
References: