What is the right way to include an additional JAR file in an Eclipse plugin? My own plugin requires apache-commons-io. I copied the JAR into my plugins directory and added it via the "Dependencies" tab of the plugin manifest. This works for me, but other users of my plugins will have to download Commons-IO manually.
What is the correct way to package Commons-IO in my plugin?
I usually use the following strategy:
MANIFEST.MF
contains the correct entries - then I use this. Have a look at the Orbit project for a set of pre-packaged bundles of all sorts. org.apache.commons.io
is already here...MANIFEST.MF
- e.g. Bundle-ClassPath: library.jar,.
Sometimes it is cleaner to create a unique plugin for libraries. (So you can use it from several plugins, License topics, Size of your Plug-In, different version, ...)
Do so by "New ..." Category: "Plug-In Development" then "Plug-In from existing jar archieve"
Select your jars and there you go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With