Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Handling non-osgi/non-p2 available dependencies?

See inline

> -----Original Message-----
> From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-
> bounces@xxxxxxxxxxx] On Behalf Of motes motes
> Sent: Montag, 27. Februar 2012 13:59
> To: Tycho user list
> Subject: [tycho-user] Handling non-osgi/non-p2 available dependencies?
> 
> This has been up many times before - how to handle non-osgi/non-p2
> dependencies in an eclipse pde project when building with tycho.
> 
> We have previously used the tycho-extra plugin to build a p2 site with
> the required dependencies (only works if they already have meaningful
> bundle-headers in the manifest file) in combination with felix (to add
> bundle headers for non-osgi projects).
> 
> Now we simply use the maven-dependency-plugin to copy the necessary
> dependencies from nexus at build time to the bundle project root and
> add it to its classpath. The advantage is that it can be done in the
> same reactor and is private for the project.

The key term here is "private": As long as you don't export anything from the dependencies you are embedding, this approach is okay. However this basically forces you to only use the dependencies from one single bundle.

However things change as soon as you need to export something from the included dependencies. Then you basically create an OSGi wrapper in your own bundle, and that can mean OSGi hell for your users: If they combine your bundle with something else using the same library, your bundle is likely to collide with other wrappers for the library.

So, if you need to export, build a separate OSGi wrapper, e.g. with Felix.

Regards
Tobias


> Are there a better way to do this/how do you guys handle this problem?
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top