组合/聚合eclipse p2存储库/可扩展的p2存储库 [英] Combine/aggregate eclipse p2 repositories / extendable p2 repository

查看:150
本文介绍了组合/聚合eclipse p2存储库/可扩展的p2存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用maven / tycho构建 Nodeclipse Eclipse插件,每个版本都有新的p2存储库。

With maven/tycho build for Nodeclipse Eclipse plugin there is new p2 repository every release.

发布是在不允许更新文件的 Bintray 上完成的。所以每个版本都在其文件夹中。

Release is done on Bintray that does not allow to update files. So every version goes in its folder.

BaseFolder
BaseFolder/VersionFolder1
BaseFolder/VersionFolder2
BaseFolder/VersionFolder3

有可能有 BaseFolder 准备一次作为可扩展的p2存储库,然后添加 VersionFolderN

Is it possible to have BaseFolder prepared once as extendable p2 repository, and VersionFolderN added later?

所以只有一个URL对于更新,Eclipse平台可以发现存储库中的更新。

So that there would be only one URL for updates and Eclipse platform could discover updates in the repository.

推荐答案

您要查找的是一个复合p2存储库。您只需要在基本文件夹中的以下两个文件:

What you are looking for is a composite p2 repository. You'll just need the following two files in the base folder:


  • A compositeContent.xml 包含以下内容:

<?xml version='1.0' encoding='UTF-8'?>
<?compositeMetadataRepository version='1.0.0'?>
<repository name='Project XYZ Releases Repository' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
    <properties size='1'>
        <property name='p2.atomic.composite.loading' value='true'/>
    </properties>
    <children size='3'>
        <child location='VersionFolder1'/>
        <child location='VersionFolder2'/>
        <child location='VersionFolder3'/>
    </children>
</repository>


  • A compositeArtifacts.xml with以下类似的内容:

  • A compositeArtifacts.xml with the following, similar content:

    <?xml version='1.0' encoding='UTF-8'?>
    <?compositeArtifactRepository version='1.0.0'?>
    <repository name='Project XYZ Releases Repository' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>
        <properties size='0'>
        </properties>
        <children size='3'>
            <child location='VersionFolder1'/>
            <child location='VersionFolder2'/>
            <child location='VersionFolder3'/>
        </children>
    </repository>
    


  • 当新版本发布时,只需添加新文件夹作为两个文件中的子文件。

    When a new version is released, just add the new folder as child in both files.

    这两个文件也可以压缩为ZIP,并命名为 compositeContent.jar compositeArtifacts.jar 以节省网络带宽。但是,这使得编辑文件的实用性稍差一些。

    The two files may also be compressed as ZIP and named compositeContent.jar and compositeArtifacts.jar to save network bandwidth. However this makes editing the files a little less practical.

    Eclipse同时发布的存储库也使用这种方法。例如,在撰写本文时, Eclipse Luna存储库仅包含原始版本和SR 1(请参阅 compositeContent compositeArtifacts )。稍后将添加SR 2,以便用户能够获得更新,而无需配置新的存储库URL。

    The Eclipse simultaneous release repositories also use this approach. E.g., at the time of writing this, the Eclipse Luna repository contains only the original release and SR 1 (see compositeContent, compositeArtifacts). SR 2 will be added later, so that users will be able to get updates without having to configure a new repository URL.

    这篇关于组合/聚合eclipse p2存储库/可扩展的p2存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆