2011-06-15 54 views
4

我厌倦了每次更改eclipse安装时都必须从网上安装数百个插件(我使用大量的em)。如何从在线更新站点创建eclipse更新归档?

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

有没有办法将这些下载的jar包捆绑到一个档案中,这样下一次可以在本地进行更新而无需再次下载所有的插件?

回答

3

您可以镜像所需功能并创建本地回购。您需要定期安装的功能的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安装配置躺在附近是使用帮助>安装新软件,并提供您的旧日食作为回购地点。 OLD_ECLIPSE_INSTALL/P2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile

+0

未关闭... – mvmn 2014-11-16 05:42:59

4

我想加入到保罗的回答中,你不必列出所有的ID下面的Ant脚本该网站包含的功能:

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