I have an offline (no internet) eclipse install that I would like to install some plugins from the eclipse marketplace. It used to be that the marketplace site would provide link to download the 'update site' (Downloading Eclipse plug-in from Eclipse Marketplace for offline usage), but this is no longer the case. The 'install' and 'download' buttons in the marketplace are just a reference urls that only eclipse seems to understand what to do with.
The few recent examples that I have been able to find involve downloading the update sites from non-eclipse sites:
Is there not a way to get the download url from the marketplace?
Alternatively some posts talk about mirroring the p2 repo. Downloading a full repo isn't optimal (I just want a few plugins), but I can't even find up-to-date instructions for that either.
You can make local mirrors of marketplace update sites using the p2 mirror application that comes with Eclipse.
Here is how to find the update site URL of, for example, the JRebel plugin:
Go to https://marketplace.eclipse.org/content/jrebel-and-xrebel-eclipse and click as shown below to reveal the update site URL:
Now with the update site URL, you can make an offline mirror of the update site with the following two commands.
On Linux/Mac, to make a mirror in the /home/mbooth/jrebel-local-mirror/
directory:
eclipse -nosplash -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source https://update.zeroturnaround.com/update-site/ -destination file:/home/mbooth/jrebel-local-mirror/
eclipse -nosplash -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source https://update.zeroturnaround.com/update-site/ -destination file:/home/mbooth/jrebel-local-mirror/
Or on Windows, to make a mirror in the c:\jrebel-local-mirror
directory:
eclipsec.exe -nosplash -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source https://update.zeroturnaround.com/update-site/ -destination file:///c:/jrebel-local-mirror/
eclipsec.exe -nosplash -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source https://update.zeroturnaround.com/update-site/ -destination file:///c:/jrebel-local-mirror/
(See here for the documentation of this command.)
You can zip up the directory containing the local mirror of the update site and move it to your offline machine.
Annoyingly you can't mirror partial update sites with the command line above. You need to use the ant task for that as mentioned by @howlger.