Adding update site URLs to find third-party dependencies during install

别来无恙 提交于 2019-11-29 02:00:59

The only way I have found is to add repository references into content.jar/content.xml by hand. For example, to add EMF update site into the list of available update sites one can add the following code to <repository> node:

<references size="2">
    <repository uri="http://download.eclipse.org/modeling/emf/updates/" url="http://download.eclipse.org/modeling/emf/updates/" type="0" options="0"/>
    <repository uri="http://download.eclipse.org/modeling/emf/updates/" url="http://download.eclipse.org/modeling/emf/updates/" type="1" options="0"/>
</references>

I did't found any documentation describing what type and options attributes mean. Also this solution will not work if the specified update site has already been added to available sites as disabled site (check Window -> Preferences -> Install/Update -> Available Software). In such case it is not enabled, actually I was searching how to enable it unconditionally, and found your question.

There is also an Ant script which simplifies adding associated sites into content.jar/content.xml.

Please let me know if you'll find a better way.

UPD.

It is possible to associate a new update site with a slightly different URL, for example

http://download.eclipse.org/modeling/emf/updates/

->

http://download.eclipse.org/modeling/emf/updates/#contributed-by-my-update-site

But I still hope that there is a better solution.

As Raffi comments on Eldars answer an external update site for dependencies can be added by putting the following entry in the feature.xml file.

<url>
  <discovery label="Example Update Site" url="http://example.se/update_site/"/>
</url>

This can also be done through the feature.xml editor GUI, in the InformationSites to Visit tab.

In the GUI this is described as "update sites to visit while looking for new features".

This seem to generate the entries in content.jar/content.xml that Eldar describes in their answer.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!