我正在尝试配置Maven构建一个Eclipse应用程序(带有所有Eclipse EXE等打包的Eclipse插件)。
我已经使用Maven对项目的几十个依赖项进行了管理,并将它们部署到我们的内部Nexus(OSS)服务器。我还安装了Nexus P2存储库插件、P2桥接插件(2.6.3-01)和Nexus解压缩插件(0.12.0)。我可以浏览到我们组存储库的.meta/p2文件夹,但它目前为空。
这应该比它目前显示的要简单得多。我瞄准的是Windows上的Eclipse 3.4.2(Ganymede)。如果有任何区别,我们实际上是将我们的应用程序打包成了一个精简/定制的Eclipse安装包。
eclipse-repository
当我针对包含<packaging>eclipse-repository</packaging>
的pom运行maven时,我会收到以下错误:
[ERROR] Missing requirement: MyApp 0.0.0 requires
'org.eclipse.equinox.executable.feature.group 0.0.0'
but it could not be found
我该从哪里获取它,如何将其添加到Nexus中?
当我针对包含 <packaging>eclipse-plugin</packaging>
的pom运行maven时,会出现以下错误:
[ERROR] Missing requirement: MyApp 0.0.0 requires
'bundle org.eclipse.ui 0.0.0'
but it could not be found
但我在本地文件系统中发现了以下目录(怀疑 itp-04-rcp 生成了第一个目录):
D:\maven\repository\p2\osgi\bundle\org.eclipse.ui\3.6.2.M20110203-1100
D:\maven\repository\p2\osgi\bundle\org.eclipse.ui\3.7.0.v20110928-1505
Tycho POM-First artifacts
我还尝试了pom-first-dependencies和manifest-first-dependency的组合:http://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts
我不明白这是如何工作的-我可以从Git构建itp02。我可以看到它构建了两个捆绑:
+---------------------+---------------------+--------------------------------------+ | artifactId | Bundle-Name | Bundle-SymbolicName | +---------------------+---------------------+--------------------------------------+ | pomfirst-bundle | pomfirst-bundle | tycho.demo.itp02.pomfirst-bundle | | pomfirst-thirdparty | pomfirst-thirdparty | tycho.demo.itp02.pomfirst-thirdparty | +---------------------+---------------------+--------------------------------------+
...但 build02 如何获取这些信息呢?唯一相关的部分似乎是:
Import-Package: tycho.demo.itp02.pomfirst
...这与任何一个Bundle名称都没有关系。
Felix Maven Bundle插件
我尝试了Felix maven-bundle-plugin。我使用<packaging>bundle</packaging>
在pom中包含了所有常规的maven依赖项。
mvn deploy
会在/nexus/content/repositories/snapshots/.meta/p2/plugins路径下创建一个文件。我可以通过浏览器下载JAR包,但所有依赖的JAR文件名都是"artifact-vresion"而不是"artifact_version" - 这样做对吗?mvn bundle:bundleall
为每个传递依赖项创建一个OSGI Bundle,但我不确定从这里要怎么做。mvn bundle:deploy
拒绝执行任何操作,除非我指定-DremoteOBR
和可能还有其他几个我不太理解的参数。