You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by "J.-P. Pellet" <jp...@gmx.net> on 2011/05/06 13:34:48 UTC

Resolve OSGi dependencies in workspace

Hi,

I'm using the latest IvyDE (2.2.0) and I'm trying to resolve OSGi dependencies in the workspace. So I have a plugin project with symbolic name "org.plugin.mainlib", and another, normal project with this dependency in ivy.xml:

	<dependency osgi="bundle" org="" name="ch.plugin.mainlib" />

but this is not resolved. Workspace resolution is checked in the preferences. What am I doing wrong?

Cheers,
J.-P.

Re: Resolve OSGi dependencies in workspace

Posted by "J.-P. Pellet" <jp...@gmx.net>.
> humm, maybe you could try the "extends" in the ivy.xml to reference the MANIFEST.MF
> see: http://ant.apache.org/ivy/history/latest-milestone/ivyfile/extends.html

No luck with that, unfortunately… Ivy doesn't complain about the extends="META-INF/MANIFEST.MF" (then again, it doesn't complain if I insert rubbish instead), but then the OSGi dependency specified in there is not transitively recognized.

J.-P.

Re: Resolve OSGi dependencies in workspace

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 6 mai 2011 à 14:16, J.-P. Pellet a écrit :

> Hi Nicolas,
> 
> Thanks for helping.
> 
>> Does org.plugin.mainlib is managed by IvyDE ?
>> If not, it is normal as the IvyDE workspace resolver doesn't know about the PDE-managed plugins. It should probably be a feature request.
> 
> OK, I secretly hoped I wouldn't have to include an ivy.xml file if specified osgi="bundle" in my dependency.
> 
> So now I've added that ivy.xml file just to make the OSGi bundle known to IvyDE, and it resolves properly — but no transitive dependencies are added. Isn't it supposed to go and look at my MANIFEST.MF and try to resolve those dependencies, too? 
> 
>> I hope you know that the OSGi dependency management with Ivy is in early stage. I'm also glad you're trying it :)
> 
> I think it's an excellent idea, at least for the Require-Bundle style. My main problem is now that I have some libs that are supposed to work as part of an Eclipse-based application (and are thus compiled by PDE build) but should also be available as plain jars, compiled by ant+ivy, and avoiding to redeclare all dependencies twice, once in MANIFEST.MF and once in ivy.xml sounds great!

humm, maybe you could try the "extends" in the ivy.xml to reference the MANIFEST.MF
see: http://ant.apache.org/ivy/history/latest-milestone/ivyfile/extends.html

Nicolas


Re: Resolve OSGi dependencies in workspace

Posted by "J.-P. Pellet" <jp...@gmx.net>.
Hi Nicolas,

Thanks for helping.

> Does org.plugin.mainlib is managed by IvyDE ?
> If not, it is normal as the IvyDE workspace resolver doesn't know about the PDE-managed plugins. It should probably be a feature request.

OK, I secretly hoped I wouldn't have to include an ivy.xml file if specified osgi="bundle" in my dependency.

So now I've added that ivy.xml file just to make the OSGi bundle known to IvyDE, and it resolves properly — but no transitive dependencies are added. Isn't it supposed to go and look at my MANIFEST.MF and try to resolve those dependencies, too? 

> I hope you know that the OSGi dependency management with Ivy is in early stage. I'm also glad you're trying it :)

I think it's an excellent idea, at least for the Require-Bundle style. My main problem is now that I have some libs that are supposed to work as part of an Eclipse-based application (and are thus compiled by PDE build) but should also be available as plain jars, compiled by ant+ivy, and avoiding to redeclare all dependencies twice, once in MANIFEST.MF and once in ivy.xml sounds great!

J.-P.

Re: Resolve OSGi dependencies in workspace

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 6 mai 2011 à 13:34, J.-P. Pellet a écrit :

> Hi,
> 
> I'm using the latest IvyDE (2.2.0) and I'm trying to resolve OSGi dependencies in the workspace. So I have a plugin project with symbolic name "org.plugin.mainlib", and another, normal project with this dependency in ivy.xml:
> 
> 	<dependency osgi="bundle" org="" name="ch.plugin.mainlib" />
> 
> but this is not resolved. Workspace resolution is checked in the preferences. What am I doing wrong?

Does org.plugin.mainlib is managed by IvyDE ?
If not, it is normal as the IvyDE workspace resolver doesn't know about the PDE-managed plugins. It should probably be a feature request.
If it is managed by IvyDE, what does the info tag of the ivy.xml of org.plugin.mainlib declare ? Did you set osgi="bundle" there ?

I hope you know that the OSGi dependency management with Ivy is in early stage. I'm also glad you're trying it :)

Nicolas