Adding update site URLs to find third-party dependencies during install(在安装期间添加更新站点 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>
我没有找到任何描述 type
和 options
属性含义的文档.此外,如果指定的更新站点已作为禁用站点添加到可用站点(检查窗口 -> 首选项 -> 安装/更新 -> 可用软件),则此解决方案将不起作用.在这种情况下它没有启用,实际上我正在寻找如何无条件启用它,并找到了你的问题.
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 以查找第三方依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在安装期间添加更新站点 URL 以查找第三方依赖项


- C++ 和 Java 进程之间的共享内存 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01