简体   繁体   English

Eclipse Marketplace插件静默安装

[英]Eclipse Marketplace plug-ins silent install

I'm trying to establish a Ubuntu dev workstation in a VM that will serve as the base VM image for our team. 我正在尝试在VM中建立Ubuntu开发工作站,以作为我们团队的基本VM映像。 There are several Eclipse plugin we use for our development, I would like to script their install, and I would like to install from Marketplace. 我们有几个用于开发的Eclipse插件,我想编写它们的安装脚本,并想从Marketplace进行安装。 Is that something achievable on Ubuntu? 在Ubuntu上可以实现吗? How would I lookup and reference the plugin, and then how would I initiate the install? 我将如何查找和引用插件,然后如何启动安装? Or should I consider a different approach entirely? 还是我应该完全考虑使用其他方法? Thanks! 谢谢!

torkildr has described a way to retrieve the repository URL and feature name from the Marketplace API. torkildr描述了一种从Marketplace API中检索存储库URL和功能名称的方法。

Given a Marketplace install URL ( https://marketplace.eclipse.org/marketplace-client-intro?mpc_install={ID} ), construct the API URL as https://marketplace.eclipse.org/node/{ID}/api/p . 给定Marketplace安装URL( https://marketplace.eclipse.org/marketplace-client-intro?mpc_install={ID} ),将API URL构造为https://marketplace.eclipse.org/node/{ID}/api/p Retrieve the XML file from that URL and look for the repository URL in the updateURL tag, and the available features in the ius tag. 从该URL检索XML文件,并在updateURL标记中查找存储库URL,并在ius标记中查找可用功能。 You'll need to append .feature.group to each IU feature listed, so the final command to install one of the listed features is: 您需要将.feature.group附加到列出的每个IU功能,因此安装列出的功能之一的最终命令是:

./eclipse -nosplash -application org.eclipse.equinox.p2.director -repository {repository URL} -installIU {iu}.feature.group

If you can determine the Update Site and feature names from an existing install (the About dialog's Installation Details will show you the Feature IDs), you can drive the process headlessly via the P2 Director . 如果可以从现有安装中确定“更新站点”和功能名称(“ 关于”对话框的“ 安装详细信息”将显示功能ID),则可以通过P2 Director毫不费力地推动该过程。 For example, to tell it to install the MarketPlace Client itself: 例如,告诉它自己安装MarketPlace Client:

./eclipse -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/releases/oxygen -installIU org.eclipse.epp.mpc.feature.group -nosplash

As far as I can tell, the MarketPlace Client does not contribute an extension to org.eclipse.core.runtime.applications , so you can't call it from the command line. 据我所知,MarketPlace客户端不提供org.eclipse.core.runtime.applications的扩展,因此您不能从命令行调用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM