2

我想从他们的更新站点将 SWTBot 安装到 Eclipse 中。我通过 UI 手动安装它并且它工作。我用于存储库的链接是:http: //download.eclipse.org/technology/swtbot/releases/latest/

现在我正在尝试使用命令行安装 SWTBot。我找到了以下命令:

eclipse.exe -application org.eclipse.equinox.p2.director \
    -repository http://download.eclipse.org/technology/swtbot/releases/latest/ \
    -installIU <feature IDs>

如果我提供 SWTBot 的所有功能 ID,这将有效。我的问题是如何在该更新站点中安装所有功能,而不必一一提供所有功能 ID?

我尝试省略该-installIU选项,但这不起作用。

4

3 回答 3

3

您可以使用 director 应用程序对存储库中可用的可安装单元运行查询。使用以下命令,您将获得存储库中所有功能的列表:

eclipsec.exe -application org.eclipse.equinox.p2.director \
   -repository <URL of some repository> \
   -list "Q:everything.select(x | x.properties ~= filter(\"(org.eclipse.equinox.p2.type.group=true)\"))"

您可以清理该命令的输出并将其作为-installIU参数传递给您的 director 调用。这将允许您从存储库安装所有功能。

相关问题:使用 p2 查询语言在 p2 存储库中查找单元的命令行

于 2013-10-29T14:24:55.473 回答
0

AFAIK there is no universal kosher way of doing that since a P2 repository (what you call "update site") may contain different types of artifacts which are not necessarily grouped together in a consistent way.

@oberlies' suggestion should work, you just need to find the proper syntax for that.

However I am not quite sure it's a good idea to blindly install everything you have in the repo.

The SWT bot repo contains only 5 categorized features, so IMHO there is no need for any scripts, just check which of the features you really need, since there are just few of them.

Repo categories

于 2013-10-30T12:15:59.817 回答
0

使用Nodecipse CLI 安装程序

npm install nodeclipse -g

然后

nodeclipse install all from <repositoryURL>

查看

>nodeclipse help install
Nodeclipse CLI Installer (Eclipse Plugin Manager epm)
    nodeclipse help
    nodeclipse help aliases
  Usage (from folder with eclipse):
    nodeclipse list [repositoryURL]
      default repositoryURL is http://www.nodeclipse.org/updates/
      repositoryURL may be file e.g. jar:file:/D:/path/to/org.nodeclipse.site-0.10.0-SNAPSHOT.zip!/
    nodeclipse install <alias|exact.feature.name.feature.group> [...]
    nodeclipse install from repositoryURL <alias|exact.feature.name.feature.group> [...]
    nodeclipse install all from repositoryURL // BE CAREFUL WHAT YOU ASK FOR
  Mapped aliases(21): egit git gfm gradle hudson icons jjs markdown maven mongodb mongodb.shell moonrise nodejs phantomjs pluginslist restclient shelled startexplorer themes wikitext yaml

  Visit http://www.nodeclipse.org/ for News, post Shares, Installing details, Features list, Usage (incl Video, Demo) with all shortcuts, Help and Hints, Support options, Where Helping needed, How to
thank and Contact us, also History page.

从 0.10.8 版本开始,我注意到当功能之间存在依赖关系时,p2 director 无法更新(Eclipse p2 director 应用程序无法更新功能)。
此外,它无法解决从 Eclipse 主存储库中获取丢失的 IU(就像 Eclipse GUI 那样。)

@oberlies,我尝试过使用查询,但从 JavaScript 使用时失败:

//var query = '"Q:everything.select(x | x.properties ~= filter(\"(org.eclipse.equinox.p2.type.group=true)\"))"';
//var query = '"Q:everything.select(x | x.properties ~= filter(\\\"(org.eclipse.equinox.p2.type.group=true)\\\"))"';
var query = ''; //both option fails with Node

所以刚刚使用 JavaScript ( .split, .filter) 进行了过滤。

于 2014-02-19T10:25:15.120 回答