2013-10-29 13 views
1

我想從他們的更新站點將SWTBot安裝到Eclipse中。我通過UI手動安裝它,它工作。我用於存儲庫的鏈接是:http://download.eclipse.org/technology/swtbot/releases/latest/如何使用命令行將p2更新站點中的所有功能安裝到Eclipse中?

現在我試圖使用命令行安裝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選項,但這不起作用。

回答

0

AFAIK沒有這樣做,因爲P2存儲庫(你所說的「更新站點」)可能包含不同類型的假象以一致的,其不一定組合在一起,沒有一個普遍的猶太方式辦法。

@oberlies的建議應該工作,你只需要找到適當的語法。

但是,我不太確定盲目安裝您在回購協議中的所有內容是個好主意。

SWT機器人回購只包含5個分類功能,所以恕我直言,不需要任何腳本,只需檢查你真正需要哪些功能,因爲它們只有少數。

Repo categories

3

您可以使用導演應用程序對存儲庫中可用的可安裝單元運行查詢。用下面的命令,你會得到的所有功能列表中的存儲庫:

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參數。這將允許您安裝存儲庫中的所有功能。

相關問題:Command line to find units in a p2 repository using p2 query languange

+1

我不明白,我必須把它放在哪裏?導演應用程序是否有UI? – taclight

0

使用Nodecipse CLI Installer

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可怕當功能之間存在依賴關係時,ctor無法更新(Eclipse p2 director application cannot update a feature)。
也不能決心採取從Eclipse主倉庫丟失IU

@oberlies,我一直在使用查詢嘗試,但它不能從JavaScript使用時(如Eclipse的GUI會做。):

//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)。

相關問題