Question

I am finishing a Java library that I want to make available to third parties. In addition to its core functionality, I am providing some classes that ease the usage of my library when used as part of an Eclipse plugin. Then, I have some dependencies in my library to certain OSGi/Eclipse classes (e.g., org.osgi.framework.Bundle, org.eclipse.core.runtime.FileLocator, org.eclipse.jdt.core.dom.CompilationUnit, among others).

So my questions is: What is the correct/convenient way to package this library for third parties usage?. Should I include all the Eclipse jars that contain the required dependencies ?. Intuitively, I think this is not a good solution given that the user obviously could have a different Eclipse version than the one I have, and this could lead to class loading conflicts. The solution of just not providing the Eclipse jars - and asking the user to find the ones he/she likes - does not really convince me neither.

I do not have lots of experience with Maven, but as far as I understand I can create a POM file that the user can use for downloading the last version of my project and its dependencies. But again: in that case I also have to decide if I should include or not the Eclipse jars in the download, considering the reasons I wrote above.

Thanks for sharing your experience on this regard.

Was it helpful?

Solution

Installation and updates are managed in Eclipse using a provisioning platform called p2.

The most convenient way is to create a Feature to package your plugins/libraries and use Feature Export wizard to create p2 meta-data repository from where your feature can be installed. P2 will take care of the dependencies.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top