Generating p2 meta data from command line

本文介绍了一种使用Eclipse的p2能力自动化创建更新站点的方法,通过命令行工具FeaturesAndBundlesPublisher来实现对插件的发布,并提供了一个示例命令行调用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Many times when working with Eclipse RCP I had to generate ad-hoc updatesites (usually containing some 3rd party plug-ins). What I usually did to achieve this (with Eclipse IDE):

  • create new feature project
  • add plug-ins to the feature
  • create new updatesite project
  • add the feature to the updatesite (pre-p2 style – site.xml)
  • export newly created updatesite (letting Eclipse to deal with creating p2 meta data)

Since I needed to automate this process I started researching on p2 capabilities and found out that it can be done from command line using FeatureAndBundlesPublisher application. Sample command line invocation to do it:

%ECLIPSE_EXE% -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher -metadataRepository file:/%P2_TARGET% -artifactRepository file:/%P2_TARGET% -source %P2_SRC% -compress -configs win32.win32.x86 -publishArtifacts

Where:

  • ECLIPSE_EXE – points to Eclipse executable;
  • P2_TARGET – path to an empty directory where p2 repository should be created;
  • P2_SRC – path to the directory with /plugins subdirectory and plug-ins to be published (jar files) inside;
  • -compress parameter is optional. It compresses artifacts.xml and content.xml to jar (zip) files.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值