使用Maven构建Eclipse插件

使用Maven构建Eclipse插件,maven,eclipse-plugin,eclipse-rcp,tycho,p2,Maven,Eclipse Plugin,Eclipse Rcp,Tycho,P2,我正在尝试配置Maven来构建Eclipse应用程序(Eclipse插件与所有Eclipse EXE打包在一起,等等) 我已经对项目的几十个依赖项进行了mavenise,并将它们部署到我们的内部Nexus(OSS)服务器上。我还安装了Nexus P2存储库插件和P2桥接插件(2.6.3-01)以及Nexus解压插件(0.12.0)。我可以浏览到组存储库的.meta/p2文件夹,但它当前为空 这应该比目前看起来要简单得多。我的目标是Windows上的Eclipse3.4.2(Ganymede)。如

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

我已经对项目的几十个依赖项进行了mavenise,并将它们部署到我们的内部Nexus(OSS)服务器上。我还安装了Nexus P2存储库插件和P2桥接插件(2.6.3-01)以及Nexus解压插件(0.12.0)。我可以浏览到组存储库的.meta/p2文件夹,但它当前为空

这应该比目前看起来要简单得多。我的目标是Windows上的Eclipse3.4.2(Ganymede)。如果有什么不同的话,我们实际上是将应用程序打包为一个精简/定制的Eclipse安装来部署的

eclipse存储库 当我使用
eclipse存储库对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?

当我使用
eclipse插件对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生成的第一个目录):

第谷波姆第一文物 我还尝试了pom first dependencies和manifest first dependency组合:

我不明白这是如何工作的——我可以从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 | +---------------------+---------------------+--------------------------------------+ …这与任何一个捆绑包名称都没有任何关系

Felix Maven Bundle插件 我试过了。我将所有常规maven依赖项包含在带有
包的pom中

  • mvn部署
    在/nexus/content/repositories/snapshots/.meta/p2/插件中创建一些东西。我可以通过浏览器下载jar,但是所有依赖jar都被命名为“artifact vresion”,而不是“artifact_version”——对吗

  • mvn bundle:bundleall
    为每个可传递依赖项创建一个OSGI bundle,但我不确定从这里如何处理它们

  • mvn bundle:deploy
    拒绝执行任何操作,除非我指定了
    -dremotebr
    以及一些我不太理解的其他参数


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

另见

问候,,
Paolo

你能让maven/tycho实例化一个目标平台来构建你的源插件吗

要解决缺少依赖项的问题:

[ERROR]   Missing requirement: MyApp 0.0.0 requires 
          'bundle org.eclipse.ui 0.0.0'
          but it could not be found
似乎您的功能/插件MyApp需要下载org.eclipse.ui插件才能安装

您应该通过配置pom检查设置,如下所示:

 <properties>
  <tycho.version>0.25.0</tycho.version>
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  <repository.url>http://download.eclipse.org/releases/neon</repository.url>
 </properties>

 <repositories>
  <repository>
   <id>NeonRepository</id>
   <url>${repository.url}</url>
   <layout>p2</layout>
  </repository>

0.25.0
UTF-8
http://download.eclipse.org/releases/neon
新还原
${repository.url}
p2
如果已设置自托管p2存储库,请确保页面已正确生成。 如果选择(在eclipse中)帮助->安装新软件,则可以选中此选项。 Eclipse应该显示提供的部分。 如果没有显示任何内容,即使取消选中了每个复选框,也应该检查p2存储库。 它应该包含“features”“plugins”容器以及artifacts.jar和content.jar。 如果只有这两个文件夹,则应运行

eclipse -application org.eclipse.equinox.p2.publisher.UpdateSitePublisher
 -metadataRepository file:/<some location>/repository
 -artifactRepository file:/<some location>/repository
 -source /<location with a site.xml>
 -configs gtk.linux.x86
 -compress
 -publishArtifacts
eclipse-application org.eclipse.equinox.p2.publisher.updatesteppepublisher
-元数据存储库file://repository
-工件库file://repository
-来源/
-配置gtk.linux.x86
-压缩
-出版文物
在CLI/Shell中。
有关更多信息,请查看。

您的具体问题是什么?似乎你想为整个“如何开发插件”的故事找到一个解决方案。这样的问题不适合stackoverflow,因为它需要一篇博文长度的答案。@oberlies-我只是想要一个可行的解决方案-我如何在Nexus repo中使用maven工件来构建RCP应用程序?问题是,这方面的文档分散在几十个页面/博客/维基上,有各种各样的方法和如此多的方面,我不知道如何验证每个部分都在工作。。。RCP应用程序将需要来自Nexus存储库“内部”、“快照”和其他代理repo的工件-我是否将P2功能配置为指向“公共”组repo?“重建P2回购/清单”任务是什么?哪个组和路径?我怎么知道它实际上做了什么呢?我的Eclipse(Indigo 3.7.2)有“org.Eclipse.equinox.launcher_1.2.0.v20110502.jar”和一个文件夹“org.Eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502”。eclipse的目标版本有“org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar”和文件夹“org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731”
 <properties>
  <tycho.version>0.25.0</tycho.version>
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  <repository.url>http://download.eclipse.org/releases/neon</repository.url>
 </properties>

 <repositories>
  <repository>
   <id>NeonRepository</id>
   <url>${repository.url}</url>
   <layout>p2</layout>
  </repository>
eclipse -application org.eclipse.equinox.p2.publisher.UpdateSitePublisher
 -metadataRepository file:/<some location>/repository
 -artifactRepository file:/<some location>/repository
 -source /<location with a site.xml>
 -configs gtk.linux.x86
 -compress
 -publishArtifacts