Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Equinox, how to configure auto load the bundles in plugin folder

I've followed http://www.eclipse.org/equinox/documents/quickstart-framework.php but it seems to be old and not valid.

There is no such bundles as described org.eclipse.update.configurator_3.2.100.jar

I tried with the org.eclipse.equinox.simpleconfigurator_1.0.200.v20100503, but doesn't work.

Anyone can tell me how to make Equinox auto load the bundles inside plugins folder?

like image 480
John John Pichler Avatar asked Mar 02 '11 18:03

John John Pichler


1 Answers

Simplest approach would be to use Apache Felix File Install. It works just fine with Equinox, you only need to put File Install configuration parameters into the configuration/config.ini. Note though that if you launch Equinox via launcher JAR or via binary, the working directory would be parent of configuration/ or plugins/ directory.

Excerpt from our project config.ini:

# Start File Install itself
osgi.bundles=reference\:file\:org.apache.felix.fileinstall_3.1.0.jar@1\:start
# The name of the directory to watch
felix.fileinstall.dir=./plugins
# A regular expression to be used to filter file names
# We have all bundles in plugins/ directory, this regexp
# forbids monitoring bundles that are started via osgi.bundles property
felix.fileinstall.filter=^(?!org.apache.felix.fileinstall|org.eclipse.osgi).*
# Determines if File Install waits felix.fileinstall.poll milliseconds before doing an initial scan or not.
felix.fileinstall.noInitialDelay=true
# Not sure why we have this...
felix.fileinstall.start.level=2

Other possible solution would be to use Eclipse P2. It is much more advanced and powerful, though I find it quite difficult to use.

Good thing is that if your application is agnostic to the way bundles are provisioned (and it should be this way), you can always change your mind later.

like image 149
Ivan Dubrov Avatar answered Oct 19 '22 01:10

Ivan Dubrov