开发者

How to create an eclipse update archive from an online update site?

I'm getting tired of having to install hundreds of plugins(I use a lot of em) from the web everytime I change my eclipse installation.

What eclipse does during a plugin install is download the relevant jars from the update site and install them.

Is there any way to bundle up these download jars into an archive so that the next time one开发者_如何学运维 can update locally without having to download all the plugins again?


I'd like to add to Paul's answer the following Ant script in which you don't have to list all the IDs of the features contained in the site:

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


You can mirror the features you want and create a local repo. You need the IDs of the features you regularly install (they're in your eclipse/features directory), and then you can create a little ant script to create your local repo. From there, you can just install locally. Repo IDs are the same as the feature 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>

That can be run by something like:

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

Another option if you still have your older eclipse install lying around is to use Help>Install New Software and provide your old eclipse as a repo location. OLD_ECLIPSE_INSTALL/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜