Can Eclipse 3.5 discover all bundles in the plugins dir?

3.6k views Asked by At

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.

3

There are 3 answers

4
Francis Upton IV On BEST ANSWER

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.

2
Ryan Lynch On

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.

5
VonC On

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.