Reputation:
I have a large eclipse RCP application. Looking at the Package Explorer view, I have many plugins. Underneath each plug-in there is a Plug-in Dependencies section and a lib directory. What is the difference between the jars in the Plug-in Dependencies section and the lib directory? The Plug-in Dependencies section is not a physical directory on disk. Is the plug-in dependencies section a visual representation of the plugin.xml file? What is the relationship between these two different things?
Upvotes: 0
Views: 147
Reputation: 111216
The Plug-in Dependencies section shows you which other plugins this plugin uses. This corresponds to the 'Require-Bundle' and 'Import-Package' sections of the plugin META-INF/MANIFEST.MF.
Any 'lib' folder is not a standard feature of plugins. If the plugin needs to use some non-plugin jars they can be included in the plugin and are usually put in a 'lib' folder. The 'Bundle-ClassPath' entry in the MANIFEST.MF lists everything that is included in the classpath of the plugin.
Note: Eclipse plugins conform to the OSGi specification. OSGi calls plugins 'Bundles'.
As an example here is the MANIFEST.MF from a plugin in one of my RCPs:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: greg.music.ogg;singleton:=true
Bundle-Version: 2.0.0.qualifier
Bundle-Vendor: %plugin.provider
Bundle-Localization: plugin
Require-Bundle: greg.music.core;bundle-version="1.0.0",
greg.music.resources;bundle-version="1.0.0",
org.eclipse.core.runtime,
javazoom.jlgui.basicplayer,
org.eclipse.e4.core.services;bundle-version="2.0.100"
Bundle-ClassPath: .,
lib/jogg-0.0.7.jar,
lib/jorbis-0.0.15.jar,
lib/vorbisspi1.0.2.jar
Bundle-RequiredExecutionEnvironment: JavaSE-9
Import-Package: javax.annotation;version="1.0.0",
javax.inject;version="1.0.0",
org.eclipse.e4.core.di.annotations
There is a 'Require-Bundle' for 5 other plugins and an 'Import-Package' for 3 other packages. The 'Bundle-Classpath' includes the main plugin code (shown as '.') and 3 jars in a 'lib' directory.
Upvotes: 1