2011-06-15 59 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>