首页 > 解决方案 > Eclipse p2 镜像保留源

问题描述

我正在寻找一种方法来制作 p2 存储库的镜像 - 将其减少到所需的内容并仍然保持源连接。到目前为止,我一直在尝试使用 ant 任务来镜像存储库:

<target name="R2020-09-partial" description="Reduced 2020-09 update site only containing feratures and plugins directly or indirectly references by the update site">
    <p2.mirror>
        <repository location="${destinationFolder}${ant.project.invoked-targets}" />
        <source>
            <repository location="${destinationFolder}/R2020-09" />
        </source>
        <slicingOptions followStrict="false" />
        <iu id="org.eclipse.platform.feature.group" />
        <iu id="org.eclipse.rcp.feature.group" />
        [...]
        <iu id="org.eclipse.help.feature.group" />
    </p2.mirror>
</target>

这工作正常并创建了一个镜像,但只有极少数原始资源仍然是镜像的一部分。不知何故,它不是没有全部,而是只有一些

如何使 p2.mirror 复制它所需要的 jar 的所有来源?

我一直在阅读此 https://rtist.hcldoc.com/help/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fp2_repositorytasks.htm但我无法找到线索正在寻找。

谢谢大家尼科

PS。为澄清起见,destinationFolder 包含一个没有任何切片的 R2020-09 镜像。这也是我看到来源的地方。他们似乎在切片步骤中迷路了。

标签: eclipse-rcpp2

解决方案


对于提到的三个功能安装单元,有相应的源安装单元:

<iu id="org.eclipse.platform.feature.group" />
<iu id="org.eclipse.platform.source.feature.group" />

<iu id="org.eclipse.rcp.feature.group" />
<iu id="org.eclipse.rcp.source.feature.group" />

[...]

<iu id="org.eclipse.help.feature.group" />
<iu id="org.eclipse.help.source.feature.group" />

代替 Ant,您可以考虑将 Maven 与 Tycho 的tycho-p2-extras:mirror一起使用(参见此处的示例)。


推荐阅读