如何从在线更新站点创建eclipse更新存档?

时间:2011-06-15 15:41:19

标签: eclipse plugins archive

每次改变我的eclipse安装时,我都厌倦了从网上安装数百个插件(我使用了大量的em)。

在插件安装过程中,eclipse会从更新站点下载相关的jar并安装它们。

有没有办法将这些下载罐捆绑到一个存档中,以便下次可以在本地更新而无需再次下载所有插件?

2 个答案:

答案 0 :(得分:5)

我想在Paul的回答中添加以下Ant脚本,您不必列出该站点中包含的所有功能的ID:

<?xml version="1.0" ?>
<project name="MyProject" default="CreateLocalRepo" basedir=".">
  <target name="CreateLocalRepo">
    <p2.mirror destination="file://..." ignoreerrors="true">   
      <source>
        <repository location="http://.../" />
      </source>
    </p2.mirror>
  </target>
</project>

答案 1 :(得分:4)

您可以镜像所需的功能并创建本地存储库。您需要定期安装的功能的ID(它们位于eclipse/features目录中),然后您可以创建一个小的ant脚本来创建本地仓库。从那里,您可以在本地安装。回购ID与要素ID +“.feature.group”

相同
<target name="CreateLocalRepo">
   <p2.mirror destination="file:///opt/local/eclipseMirror" ignoreerrors="true">
      <source location="http://download.eclipse.org/releases/helios"/>
      <iu id="org.eclipse.emf.sdk.feature.group"/>
      <iu id="org.eclipse.releng.tools.feature.group"/>
   </p2.mirror>
<target>

可以通过以下方式运行:

eclipse/eclipse -noSplash \
-application org.eclipse.ant.core.antRunner  \
-buildfile createLocalRepo.xml

另一个选择是,如果您仍然使用旧的eclipse安装,请使用帮助&gt;安装新软件并将旧日食作为回购位置提供。的 OLD_ECLIPSE_INSTALL / P2 / org.eclipse.equinox.p2.engine / profileRegistry / SDKProfile.profile