felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: managing OSGi Dependencies
Date Sat, 25 Oct 2014 07:07:29 GMT
You are fully right.

In fact you can even distinguish runtime and compile time libraries in 
maven. In reality though often all libraries are simply marked as 
compile (which is compile + runtime). Additionally people
regularly forget to clean up the dependencies and remove unused ones. So 
as you stated maven often has more dependencies than are needed.

This is also why I rather do not trust the karaf maven plugin to create 
features from the maven deps and instead create them by hand. As this is 
also error prone we really need something better here.
OBR and similar solutions could help there but I have not yet seen a 
working solution in practice till now.


On 25.10.2014 00:53, Neil Bartlett wrote:
> No, I’m not.
> Bnd performs a full inspection of the dependencies of the classes included in the bundle,
and generated imports for the referenced packages (or, in the case of Conditional-Package,
adds those packages to the bundle). Whereas the libraries specified in the POM are just the
ones that some human thought might be necessary. Or perhaps they were necessary to satisfy
the javac compiler but they were not necessary or even sufficient to actually run the code.
> Humans are lazy, bnd is smart and thorough. I trust bnd to do what it does more than
any human, including myself.
> Java developers REALLY need to break this habit of thinking that compile time and runtime
dependencies are the same! They are not. You compile against APIs and run with implementations.
> Neil

Christian Schneider

Open Source Architect

To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org

View raw message