如何下载用于离线安装的 Eclipse 市场插件

How to download eclipse marketplace plugins for offline install

我有一个离线(无互联网)eclipse 安装,我想从 eclipse 市场安装一些插件。以前是市场站点会提供link下载'update site'(),但现在已经不是这样了。市场中的 'install' 和 'download' 按钮只是一个参考 url,似乎只有 eclipse 才知道如何处理。

我最近找到的几个例子涉及从非 eclipse 站点下载更新站点:

没有办法从市场上下载 url 吗?

或者一些帖子谈论镜像 p2 仓库。下载完整的 repo 不是最佳选择(我只想要一些插件),但我什至找不到最新的说明。

您可以使用 Eclipse 附带的 p2 镜像应用程序制作市场更新站点的本地镜像。

以下是如何找到更新站点 URL,例如 JRebel 插件:

转到https://marketplace.eclipse.org/content/jrebel-and-xrebel-eclipse并单击如下所示以显示更新站点URL:

现在有了更新站点 URL,您可以使用以下两个命令制作更新站点的离线镜像。

在 Linux/Mac 上,在 /home/mbooth/jrebel-local-mirror/ 目录中制作镜像:

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/

或在 Windows 上,在 c:\jrebel-local-mirror 目录中制作镜像:

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/

(有关此命令的文档,请参阅 here。)

您可以压缩包含更新站点本地镜像的目录并将其移动到您的离线机器上。

令人讨厌的是,您不能使用上面的命令行镜像部分更新站点。如@howlger 所述,您需要使用 the ant task