使用Maven构建Eclipse插件

Nic*_*ion 10 eclipse-plugin p2 eclipse-rcp tycho maven

我正在尝试配置Maven来构建Eclipse应用程序(与所有Eclipse EXE打包在一起的Eclipse插件等).

我已经完成了项目的几十个依赖项,并将它们部署到我们的内部Nexus(OSS)服务器.我还安装了Nexus P2 Repository插件和P2 Bridge插件(2.6.3-01)以及Nexus Unzip插件(0.12.0).我可以浏览到我们的组存储库的.meta/p2文件夹,但它当前是空的.

这应该比目前看起来简单得多.我的目标是Windows上的Eclipse 3.4.2(Ganymede).如果它有所不同,我们实际上将我们的应用程序部署为精简版/自定义Eclipse安装.

Eclipse的仓库

当我对着pom运行maven时,<packaging>eclipse-repository</packaging>我收到以下错误:

[ERROR]   Missing requirement: MyApp 0.0.0 requires 
          'org.eclipse.equinox.executable.feature.group 0.0.0' 
          but it could not be found
Run Code Online (Sandbox Code Playgroud)

...我从哪里获得,以及如何将其添加到Nexus?

当我对着pom运行maven时,<packaging>eclipse-plugin</packaging>我收到以下错误:

[ERROR]   Missing requirement: MyApp 0.0.0 requires 
          'bundle org.eclipse.ui 0.0.0'
          but it could not be found
Run Code Online (Sandbox Code Playgroud)

...但是我在本地文件系统上找到了以下目录(怀疑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
Run Code Online (Sandbox Code Playgroud)

第谷POM-第一件文物

我还尝试了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
Run Code Online (Sandbox Code Playgroud)

......与Bundle-Names中的任何一个都没有任何关系.

Felix Maven Bundle插件

我尝试了Felix maven-bundle-plugin.我将所有常规maven依赖项包含在pom中<packaging>bundle</packaging>.

  • mvn deploy在/nexus/content/repositories/snapshots/.meta/p2/plugins创建一些东西.我可以通过浏览器下载jar,但是所有依赖jar都被命名为"artifact-vresion"而不是"artifact_version" - 是吗?

  • mvn bundle:bundleall 为每个传递依赖创建一个OSGI包,但我不知道从这里开始如何处理它们.

  • mvn bundle:deploy拒绝做任何事情,除非我指定-DremoteOBR,可能还有一些我不太了解的其他参数.

Pao*_*olo 3

如果您构建包含本机启动器的 Eclipse 产品(在产品配置中将“include laucher”属性设置为 true),则“org.eclipse.equinox.executable.feature.groug”似乎是必要的。尝试将该功能添加到您的平台定义中(例如,从 eclipse p2 repo 或您正在运行的 eclipse IDE 复制)。

另请参阅https://bugs.eclipse.org/bugs/show_bug.cgi?id=407272

问候,保罗