我想在Maven模块中包含org.eclipse.uml2.uml_4.0.0.v20120604-0919.jar
。我已经设置了p2存储库
<repository>
<id>juno</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/juno</url>
</repository>
并配置了Tycho构建扩展。我必须使用哪个groupdId
和artifactId
以便Tycho将org.eclipse.uml2.uml_4.0.0.v20120604-0919.jar
作为依赖项?
答案 0 :(得分:2)
在Tycho中,您需要在OSGi清单文件(META-INF/MANIFEST.MF
)中指定插件的依赖关系。因此,对于给定的Eclipse插件,您可以编写类似
Require-Bundle: org.eclipse.uml2.uml
您无法通过POM配置执行相同操作。
这背后的想法是Tycho遵循所谓的 Manifest-first 方法。 Tycho的主要配置文件是OSGi清单和其他Eclipse PDE文件格式(如feature.xml,* .product文件等)。
其他工具,如maven-bundle-plugin,遵循构建OSGi包的 POM-first 方法。对于maven-bundle-plugin,您需要在POM中指定依赖项,并相应地生成清单。