Eclipse 3.5 可以发现插件目录中的所有包吗?
简单用例:使用简单的脚本组装 Eclipse 产品,只需将包转储到插件目录中。 这曾经适用于 3.3 - 3.5 已损坏:我的应用程序无法启动,因为找不到应用程序插件。
问题:解决这个问题最简单的方法是什么?这似乎是我整个升级过程中唯一的痛苦。
尝试: 我猜想这对 P2 来说是禁忌:它维护了 bundles.info 文件,这可能非常聪明......对我来说有点太聪明了。
我有一些想法:
- 我可以完全跳过 P2 并回到简单的旧的、简单的“脏”发现机制吗?
- 我可以将插件目录设置为“监视目录”吗
- 看起来我需要使用 p2.reconciler ......哦等等,它已经被弃用了:-( bug 251561..(感谢 VonC 的指点)
- config.ini 中的旧设置仍然有效吗?(现在已被“简单配置器”取代)< code>osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@3:start, org.eclipse.core.runtime@start
- 我应该调用(p2)导演? “请选择我的插件”:)
- 我会避免使用 dropin 文件夹 - 这对于 最终用户。
- 如果可能的话,我会避免弄乱bundles.info。
我还不关心我的产品中的所有这些智能功能 - 实际上用户根本不使用内置的更新机制。 所以我想 KISS(即:只是启动),并在需要时添加更高级的支持。。
我在 Eclipse 论坛上提出了这个问题,但还没有答案,所以非常感谢您的一些启发。 另外,请随时纠正我的假设 - 我刚刚阅读了 P2 文档,有时看起来很混乱。 谢谢!
答案:实际上上面的选项 3 似乎还是有效的 - 感谢 Francis 确认这一点! (它最初不起作用,但这可能是由于某些缺失的部门造成的)。 我现在唯一的问题是,一些 Eclipse 捆绑包实际上需要简单的配置器。所以我想知道更换它是否会导致问题。
Simple usecase: assemble an Eclipse product using simple scripts, just dumping bundles into the plugins dir.
This used to work with 3.3 - with 3.5 it's broken: my application doesn't start as the app plugin is not found.
Question: what's the easiest way to fix that? This seems to be the only pain in the whole upgrade process for me.
Attempts:
I guess this is a no-no for P2: it maintains the bundles.info file instead, which is probably very smart.. a bit too smart for me.
Some ideas I had:
- can I just skip P2 altogether and get back to plain old, simple -dirty- discovery mechanism?
- can I set up plugins dir as a 'watched directory'
- looks like I need to use the p2.reconciler for that.. oh wait, it's deprecated already :-( bug 251561.. (thanks VonC for the pointer)
- can this old setting in the config.ini still work? (which is now replaced with the 'simpleconfigurator')
osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@3:start, org.eclipse.core.runtime@start
- should I call the (p2) director?
"please pick my plugins up" :) - I'd avoid the dropin folder for this - that's more for the
end-users. - I'd avoid messing with the bundles.info if possible.
I don't care about all those smart features in my product yet- actually the users don't use the built-in update mechanism at all.
So I'd like to KISS (ie: just to start up), and add more advanced support when needed.
I've asked this on Eclipse forums, but no answer yet, so would really be grateful for some enlightenment.
Also, feel free to correct me on the assumptions - I've just read the P2 docs, which seem confusing at times.
Thanks!
Answer: actually option 3 above seems to work after all - thanks Francis for confirming this! (it didn't work originally, but that was probably caused by some missing deps).
My only issue with that now is, some Eclipse bundles actually require simpleconfigurator. So I wonder if swapping it out will cause problems down the line.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以更改您的configuration/config.ini文件,不使用org.eclipse.equinox.simpleconfigurator(它执行基于p2的配置),而是使用org.eclipse.update.configurator,它是仅配置插件目录中的内容的老式方法。这应该会给你你想要的。
You can alter your configuration/config.ini file to not use the org.eclipse.equinox.simpleconfigurator (which does the p2-based configuration) and instead use the org.eclipse.update.configurator which is the old-school way of just configuring whatever is in the plugins directory. This should give you what you want.
即使它没有完全回答您的需求,您也可以在 eclipse.ini 中指定(就像我在此处描述):
这确实指定 p2 来监视您选择的任何目录以检测其中的插件。
另一个想法来源可能是这篇文章: 撰写和更新自定义 Eclipse 发行版
注意:协调的概念在 eclipse Wiki 中有详细说明。
此机制的一部分是 Dropins Reconciler 设置。尽管如 bug 251561 所示,但不建议将里面有很多插件。
Even if it does not fully answer what you are after, you can specify in an
eclipse.ini
(like the one I describe here):That does specify to p2 to monitor any directory of your choosing to detect plugins in it.
Another source of idea could be this article: Composing and updating custom Eclipse distros
Note: the concept of reconciliation is detailed in the eclipse Wiki.
Part of this mechanism is the Dropins Reconciler setting. Although, as bug 251561 illustrates, it is not advised to put too many plugins in there.
也许
Maybe this will help you (shot in the dark)? I found this when upgrading my Eclipse installation to Galileo and trying to keep my Flex Plugin install.