A plug-in that I want to install provides an update site for installation. However, the Eclipse installation that I want to install it to is on a machine that is not connected to the Internet. Is there a way for me to access the site (HTTP, FTP, etc.) to download the files in it for offline installation?
|
Eclipse offers a way of mirroring these sites automatically, either through the command line or through ant tasks. Mirror based on p2 information
Reference: Equinox p2 repository mirroring Mirror based on site.xml information
Reference: Running the update manager from the command line You can follow the evolution of these scripts in my script repository. |
|||||||||||||||||||||
|
|
After struggling with mirroring for some time, I realized that it is much easier (at least, for me) to use "wget" instead. In short:
You can read about it with more details here. |
||||
|
|
|
Eclipse plugins usually depend on other plugins. It's kind of hard to trace the dependencies. It's better to download all dependencies using update site once, and you can distribute to other Eclipse dropins. For Eclipse 3.4 or newer, you can use dropins which is an Eclipse feature. This way you don’t have to install plugin from update site every time you have to re-install your Eclipse. Read on http://michsan.web.id/content/how-install-eclipse-plugins-offline If you can't see the web, I'll give you some description Prepare directory for external plugins Create special directory to hold our beloved plugins, e.g. in /home/ichsan/eclipse-dropins we will install Maven plugin: m2eclipse.
For now on, we'll call this directory as DROPINS Preparing sandbox Next, by using Git we'll create an Eclipse sandbox. The point is to install one plugin on a fresh Eclipse. Instead of installing fresh Eclipse every time we want to install a new plugin, we'd better use Git to create new branch of fresh Eclipse. First, extract/install new Eclipse to a directory e.g. /home/ichsan/eclipse-sandbox (so that we'll find /home/ichsan/eclipse-sandbox/eclipse.ini). We call the directory as ECLIPSE_SANDBOX. Next, commit the fresh installation. This step should be done once only.
Install plugin on sandbox Now is the interesting part. Supposed we have to install m2eclipse plugin. We will install this on new Git branch so that the master branch will stay clean or stay intact.
Now, we start the Eclipse of the ECLIPSE_SANDBOX and download the plugin. Once we're done, we shut the Eclipse down and check what new directories or files have been created (using Git). Remember that, we only care about new plugins and features directories and the contents inside them. So, we won't copy the rest into dropins.
Just copy the directory of DROPINS/m2eclipse into ECLIPSE_HOME/dropins or create a symbolic link. And we're done!
Another way is to backup differences between fresh-Eclipse commit and after-plugin-installation commit.
|
||||
|
|
|
You can get it from here https://repository.sonatype.org/content/repositories/forge-sites/m2e/1.3.0/N/1.3.0.20121023-1108/ Download all files drilling down into plugins and features. Store in a directory on your machine keeping everything in the same directory structure. Move it to a folder on your dev machine. In Eclipse go to Help | Intall New Software... Hit the 'Add' button Hit the 'Local...' button Browse for the directory you dropped the files into. Follow the on screen instructions. |
|||
|
|
|
You can mirror p2 site using ant task:
or findbugs:
In order for this to work you have to run ant tasks in the same JVM as eclipse. You can find IU ids by opening "software updates" and copy it from there. In eclipse 3.5 there should be a More... button, in 3.4 you have to click on properties button. |
|||
|
|
|
Most Eclipse plug-ins can be installed without the Eclipse updater, by copying the required JARs available at the update site, into the plugins and features directories of the Eclipse installation. In certain cases, it is necessary to start Eclipse with a -clean switch. Here's an example of how to do this for the m2eclipse plugin:
PS: This method is a bit hackish, but it is based off the site-map reference. But do refer to the update Update I haven't attempted this, but you can create a local mirror site, from where everyone else can pickup the Eclipse plug-ins. In Galileo, this can be done by running the Eclipse updater in the standalone mode via the mirror command. |
|||||||||||||||||||||
|