是否可以使用 maven-bundle-plugin (bnd) 生成 plugin.xml

Is it possible to use maven-bundle-plugin (bnd) to generate plugin.xml

我知道 maven-bundle-plugin 中的 bnd 使用 POM 优先方法来构建 Eclipse 插件。

这是我更喜欢的方法,而不是使用 Tycho 和 MANIFEST 优先方法。但是我的插件还需要 plugin.xml 文件来定义扩展点。

是否也可以使用 maven-bundle-plugin 或 bnd 生成此文件?

plugin.xml不是可以生成的文件;您需要像源文件一样编写它。如果你这样做那么你绝对可以使用 bnd and/or maven-bundle-plugin 将它包含到你的包中。

不,您可能不应该将 maven-bundle-plugin 用于 Eclipse 插件开发。

旧的 OSGi 创建者和 Eclipse 方式之间存在历史分歧,到目前为止,还没有工具可以帮助您编写通用 OSGi(bnd 是最好的也是唯一的)和 Eclipse 插件,其中有依旧是Manifest+plugin.xml第一种方式。