可以使用Antscript安装P2配置文件

发布于 2025-02-09 02:57:48 字数 2827 浏览 2 评论 0原文

我正在编写Antscript来安装我基于Eclipse Mars2制作的插件。

我确实复制了&将我制作的插件粘贴到Eclipse/插件中,但我认为我需要安装P2配置文件。

在Ganymede版本中,您可以将其移至插件目录,但Mars2却没有。我认为将其放在Dropins目录中不是一个好主意。

这是我写的脚本:

目标是Eclipse.exe所在的当前目录。

Script1

<exec executable="${destination}/eclipse.exe">
            <arg value="-application"/>
            <arg value="org.eclipse.equinox.p2.director"/>
            <arg value="-repository"/>
            <arg value="http://aaa.com/update/bbb/3.x"/>
            <arg value="-installIU"/>
            <arg value="a.b.c.d.product"/>
            <arg value="-tag"/>
            <arg value="InitialState"/>
            <arg value="-destination"/>
            <arg value="${destination}"/>
            <arg value="-profile"/>
            <arg value="SDKProfile"/>
            <arg value="-profileProperties"/>
            <arg value="org.eclipse.update.install.feature=true"/>
            <arg value="-bundlepool"/>
            <arg value="${destination}"/>
            <arg value="-p2.os"/>
            <arg value="win32"/>
            <arg value="-p2.ws"/>
            <arg value="gtk"/>
            <arg value="-p2.arch"/>
            <arg value="x86_64"/>
            <arg value="-roaming"/>
        </exec>

Script2

<java
           taskname="install"
           jar="${destination}/plugins/a.b.*.jar"
           dir="${destination}"
           fork="true"
           failonerror="true">
           <arg value="-application"/>
           <arg value="org.eclipse.equinox.p2.director"/>
           <arg value="-metadataRepository"/>
           <arg value="file:${destination},jar:file:${destination}/a.b.*.jar\!/"/>
           <arg value="-artifactRepository"/>
           <arg value="file:${destination},jar:file:${target-home}/a.b.*.jar\!/"/>
           <arg value="-installIU"/>
           <arg value="a.b.c.d.product"/>
           <arg value="-destination"/>
           <arg value="${destination}"/>
           <arg value="-profile"/>
           <arg value="SDKProfile"/>
           <arg value="-profileProperties"/>
           <arg value="org.eclipse.update.install.features=true"/>
           <arg value="-p2.os"/>
           <arg value="win32"/>
           <arg value="-p2.ws"/>
           <arg value="win32"/>
           <arg value="-p2.arch"/>
           <arg value="x86_64"/>
           <arg value="-vmargs"/>
           <arg value="-Declipse.p2.data.area=${destination}/p2"/>
        </java>

两个脚本都不正常安装P2配置文件。

请告知是否有任何参考材料。

I am writing AntScript to install the plug-in I made based on Eclipse Mars2.

I did copy & paste the plug-in I made into Eclipse/Plugins, but I think I need to install the p2 profile.

In the Ganymede version, you could just move it to the Plugins directory, but Mars2 doesn't. I don't think putting it in the Dropins directory is a good idea.

Here is the script I wrote:

destination is the current directory where eclipse.exe is located.

Script1

<exec executable="${destination}/eclipse.exe">
            <arg value="-application"/>
            <arg value="org.eclipse.equinox.p2.director"/>
            <arg value="-repository"/>
            <arg value="http://aaa.com/update/bbb/3.x"/>
            <arg value="-installIU"/>
            <arg value="a.b.c.d.product"/>
            <arg value="-tag"/>
            <arg value="InitialState"/>
            <arg value="-destination"/>
            <arg value="${destination}"/>
            <arg value="-profile"/>
            <arg value="SDKProfile"/>
            <arg value="-profileProperties"/>
            <arg value="org.eclipse.update.install.feature=true"/>
            <arg value="-bundlepool"/>
            <arg value="${destination}"/>
            <arg value="-p2.os"/>
            <arg value="win32"/>
            <arg value="-p2.ws"/>
            <arg value="gtk"/>
            <arg value="-p2.arch"/>
            <arg value="x86_64"/>
            <arg value="-roaming"/>
        </exec>

Script2

<java
           taskname="install"
           jar="${destination}/plugins/a.b.*.jar"
           dir="${destination}"
           fork="true"
           failonerror="true">
           <arg value="-application"/>
           <arg value="org.eclipse.equinox.p2.director"/>
           <arg value="-metadataRepository"/>
           <arg value="file:${destination},jar:file:${destination}/a.b.*.jar\!/"/>
           <arg value="-artifactRepository"/>
           <arg value="file:${destination},jar:file:${target-home}/a.b.*.jar\!/"/>
           <arg value="-installIU"/>
           <arg value="a.b.c.d.product"/>
           <arg value="-destination"/>
           <arg value="${destination}"/>
           <arg value="-profile"/>
           <arg value="SDKProfile"/>
           <arg value="-profileProperties"/>
           <arg value="org.eclipse.update.install.features=true"/>
           <arg value="-p2.os"/>
           <arg value="win32"/>
           <arg value="-p2.ws"/>
           <arg value="win32"/>
           <arg value="-p2.arch"/>
           <arg value="x86_64"/>
           <arg value="-vmargs"/>
           <arg value="-Declipse.p2.data.area=${destination}/p2"/>
        </java>

Both scripts do not install the p2 profile normally.

Please advise if there is any reference material.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文