Which maven plugin to be used to generate OSGi bundle and how is bnd-maven-plugin different from maven-bundle-plugin.
maven-bundle-plugin
has been around for long time and that is why it most widely used.
bnd-maven-plugin
was created not so long ago (mod 2015) to address some issues with maven-bundle-plugin
. I suggest you read Neil Bartlett's post to understand the motivations.
The differences I'm aware of are:
maven-bundle-plugin
replaces maven's default jar plugin (that is why you need the artifact type to be bundle
and not jar
) while bnd-maven-plugin
does not. The formar causes issues in some cases (with some other maven plugins). The later basically means the packaging is done twice (first by BND and then by maven jar plugin)
maven-bundle-plugin
can be configured directly in the pom
or via bnd
file. bnd-maven-plugin
can only be configured via bnd
file