Eclipse 3.5 可以发现插件目录中的所有包吗?

发布于 2024-08-10 20:35:43 字数 1503 浏览 12 评论 0原文

简单用例:使用简单的脚本组装 Eclipse 产品,只需将包转储到插件目录中。 这曾经适用于 3.3 - 3.5 已损坏:我的应用程序无法启动,因为找不到应用程序插件。

问题:解决这个问题最简单的方法是什么?这似乎是我整个升级过程中唯一的痛苦。


尝试: 我猜想这对 P2 来说是禁忌:它维护了 bundles.info 文件,这可能非常聪明......对我来说有点太聪明了。

我有一些想法:

  1. 我可以完全跳过 P2 并回到简单的旧的、简单的“脏”发现机制吗?
  2. 我可以将插件目录设置为“监视目录”吗
    • 看起来我需要使用 p2.reconciler ......哦等等,它已经被弃用了:-( bug 251561..(感谢 VonC 的指点)
  3. config.ini 中的旧设置仍然有效吗?(现在已被“简单配置器”取代)< code>osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@3:start, org.eclipse.core.runtime@start
  4. 我应该调用(p2)导演? “请选择我的插件”:)
  5. 我会避免使用 dropin 文件夹 - 这对于 最终用户。
  6. 如果可能的话,我会避免弄乱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:

  1. can I just skip P2 altogether and get back to plain old, simple -dirty- discovery mechanism?
  2. 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)
  3. 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
  4. should I call the (p2) director?
    "please pick my plugins up" :)
  5. I'd avoid the dropin folder for this - that's more for the
    end-users.
  6. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

稍尽春風 2024-08-17 20:35:43

您可以更改您的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.

心在旅行 2024-08-17 20:35:43

即使它没有完全回答您的需求,您也可以在 eclipse.ini 中指定(就像我在此处描述):

-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=C:/jv/eclipse/mydropins

这确实指定 p2 来监视您选择的任何目录以检测其中的插件。


另一个想法来源可能是这篇文章: 撰写和更新自定义 Eclipse 发行版

创建包含这些内容的基于功能的产品并不难,并执行产品构建最终会得到这样的结果:

alt text


注意:协调的概念在 eclipse Wiki 中有详细说明。

对于 Eclipse 的某些安装,将存在共享安装的概念 - 这可能是在 Linux 系统的情况下,其中一组基本软件是通过软件包(可能是 RPM)安装的,或者可能是在Maya 部署,其中共享配置文件在中央服务器中定义。
在这两种情况下,有必要在共享配置文件与用户当前的配置文件实例(包括他们可能所做的任何修改)之间进行协调

此机制的一部分是 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):

-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=C:/jv/eclipse/mydropins

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

It's not hard to create a feature based product that includes these things, and do a product build to end up with something like this:

alt text


Note: the concept of reconciliation is detailed in the eclipse Wiki.

For certain installations of Eclipse, there will exist the notion of a shared installation -- this may be in the case of a Linux system where a base set of software is installed via packages (perhaps RPMs), or may be in a Maya deployment where shared profiles are defined in a central server.
In both cases, it is necessary to perform reconciliation between the shared profile and the user's current instantiation of the profile including any modifications they may have made.

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.

离笑几人歌 2024-08-17 20:35:43

也许

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文