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

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

问题描述

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

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?

我尝试将 addRepository 操作添加到功能的 p2.inf 文件中,但没有执行.

I've tried to add addRepository action to the p2.inf file of the feature, but it is not executed.

推荐答案

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

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>

我没有找到任何描述 typeoptions 属性含义的文档.此外,如果指定的更新站点已作为禁用站点添加到可用站点(检查窗口 -> 首选项 -> 安装/更新 -> 可用软件),则此解决方案将不起作用.在这种情况下它没有启用,实际上我正在寻找如何无条件启用它,并找到了你的问题.

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.

还有 一个 Ant 脚本 简化了将关联网站添加到 content.jar/content.xml.

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.

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

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天全站免登陆