Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
478 views
in Technique[技术] by (71.8m points)

Eclipse p2 mirror keeping sources

I am looking for a way to do a mirror of a p2 repository - reduce it to the needed content and still keep the sources attached. So far I have been trying to use the ant task to mirror the repository:

<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>

this is working fine and a mirror is created, but there are only very few of the original sources still part of the mirror. Somehow it is not none or all but only some.

How do I make it that the p2.mirror will copy all sources of the jars it takes?

I have been reading this https://rtist.hcldoc.com/help/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fp2_repositorytasks.htm but I have not been able to find the clue I was looking for.

Thank you all Nico

PS. for clarification the destinationFolder contains a R2020-09 mirror without any slicing. This is where I see the sources as well. They seem to get lost in the slicing step.

question from:https://stackoverflow.com/questions/65886881/eclipse-p2-mirror-keeping-sources

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

For the three mentioned feature install units, there are corresponding source install units:

<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" />

Instead of Ant, you might consider to use Maven with Tycho's tycho-p2-extras:mirror (see here for an example).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...