在安装过程中添加更新站点URL以查找第三方依赖关系 [英] Adding update site URLs to find third-party dependencies during install

查看:130
本文介绍了在安装过程中添加更新站点URL以查找第三方依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Eclipse功能,当在Helios上安装时,需要一个额外的更新站点URL才能找到某些依赖关系。是否可以自动添加这样的URL,以便用户不必手动进行操作?还是被认为是不好的做法?



我已经尝试向p2添加 addRepository 动作。 inf文件的功能,但不执行。

解决方案

我找到的唯一方法是将存储库引用添加到 content.jar / content.xml 。例如,要将EMF更新站点添加到可用更新站点的列表中,可以将以下代码添加到< repository> 节点:

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

我没有找到任何描述类型选项属性意味着。如果指定的更新站点已添加到可用站点作为禁用站点(检查窗口 - >首选项 - >安装/更新 - >可用软件),此解决方案将无法正常工作。在这种情况下,它没有启用,实际上我正在搜索如何无条件启用它,并发现您的问题。



还有一个 Ant脚本,它简化了将相关网站添加到内容中.jar / content.xml



请让我知道如果你会找到一个更好的方法。



UPD。



可以将新的更新站点与稍微不同的URL相关联,例如

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

- >

  http://download.eclipse.org/modeling/emf/更新/#贡献由我的更新网站

但我仍然希望有一个更好的解决方案。


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.

解决方案

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.

这篇关于在安装过程中添加更新站点URL以查找第三方依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆