I have an Eclipse feature which when installing on Helios requires an additional update-site URL to be present in order to find certain dependencies. Is it possible to automatically add such an URL so that the user doesn't have to do it manually? Or is it considered bad practice to do so?
I've tried to add addRepository
action to the p2.inf file of the feature, but it is not executed.
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.This can also be done through the
feature.xml
editor GUI, in the Information → Sites 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.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:I did't found any documentation describing what
type
andoptions
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
->
But I still hope that there is a better solution.