Le 18 févr. 2011 à 17:00, Martin Ždila a écrit :

> Hello
> 
> I see that in upcoming Ivy 2.3 there will be some support for OSGi
> repository. Will it also support resolving dependencies from *.bnd
> file or will I still need to specify every dependency in ivy.xml? I am
> also new to Felix Sigil, but it seems it is supporting what I need.
> 
> What I need is a single file with compile-time and runtime (OSGi)
> dependencies. Currently our product consists of cca 210 projects. Most
> of them are OSGi bundles. Runtime dependencies are specified in *.bnd
> and compile-time dependencies in ivy.xml. It is cumbersome to maintain
> both files in sync, even with versions, etc.
> 
> Should I follow Ivy 2.3 or Sigil path? Or do you have any other advice?

I don't yet what is the best fit for your need as the OSGi capabilities of Ivy 
is quite new and I don't know really yet how far we can go.
I tried to write something on the difference between Ivy and Sigil [1]. The 
pinged the Sigil team about that page and I didn't got any particular comment 
so it should be quite fair ;)

Since I'm more an Ivy user than a Sigil one, I'm looking forward using Ivy for 
managing OSGi dependencies. I have not put this into practice yet, but here is 
what I have in mind.
I think that in a project, where we want to compile and run tests, dependencies 
should be declared in an ivy.xml. Then use bnd and the classpath computed by 
ivy to build a MANIFEST.MF. When publishing the project into a shared 
repository, we won't publish the ivy.xml but the MANIFEST.MF. Actually the 
publishing will be about pushing into an OSGi Bundle Repository.
Because when we compile and run tests, we want to be precise about the bundles 
we want in. In the repository, we just want to declare dependencies on API more 
than on actual implementation.
For instance I will have a project which declare a dependency on the bundle 
org.mortbay.jetty in an ivy.xml. But when published, bnd will see that I only 
need the package javax.servlet.

Then about managing the set of bundles which should be provided in your final 
application, I think it is like managing a "target platform" in Eclipse. I 
think that Ivy can play a good role too. I don't know yet how to exactly do it 
though [2] :)

I have nearly zero experience regarding OSGi dependency management, so if you 
think I'm wrong, I'll be pleased to hear from you. Or others.

Nicolas

[1] http://ant.apache.org/ivy/history/trunk/osgi/sigil.html
[2] http://ant.apache.org/ivy/history/trunk/osgi/target-platform.html

Reply via email to