创建自己的Eclipse p2仓库

本文介绍如何将Eclipse IDE安装包转化为p2repository,以便在其他Eclipse环境中用作更新源。通过创建特定目录结构,编辑category.xml文件,并运行FeaturesAndBundlesPublisher与CategoryPublisher工具,实现资源的共享利用。

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

这边文章只是简单介绍如何将下载的Eclipse IDE 安装包制作成一个p2 repository用来在其他Eclipse IDE中作为target 中的update site来使用。

1. 创建2个目录一个文件

source: 存放下载解压后的eclipse安装包
repository:用于存放创建的repostiry的文件信息
category.xml:描述update site相关信息,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<site>
   <category-def name="all" label="P2 Repo"/>
   <iu>
      <category name="all"/>
      <query><expression type="match">providedCapabilities.exists(p | p.namespace == 'osgi.bundle')</expression></query>
   </iu>
</site>

2. 运行FeaturesAndBundlesPublisher

${eclipse_home}/eclipse -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher -metadataRepository file:${user_home}/repository -artifactRepository file:${user_home}/repository -source ${user_home}/source/eclipse -configs gtk.linux.x86 -compress -publishArtifacts

3. 运行CategoryPublisher

${eclipse_home}/eclipse/eclipse -debug -consolelog -nosplash -verbose -application org.eclipse.equinox.p2.publisher.CategoryPublisher -metadataRepository file:${user_home}/repository -categoryDefinition file:${user_home}/repository/category.xml -compress
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值