You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by aditsu <ad...@yahoo.com> on 2011/04/18 11:50:22 UTC

Ivy virtual dependencies

Hi, is it possible in Ivy to define a dependency that can be satisfied by any
one of several modules?
Specifically, the dependency would refer to certain functionality required
by the current module, and other modules would declare that they
satisfy/implement that functionality.
The concept is similar to "virtual packages" in various Linux distros.
This "virtual dependency" would not refer to any specific piece of code,
except it could default to one implementation if no other module that
satisfies the dependency is pulled through the other dependencies.

Thanks
Adrian

--
View this message in context: http://ant.1045680.n5.nabble.com/Ivy-virtual-dependencies-tp4310341p4310341.html
Sent from the Ant - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Ivy virtual dependencies

Posted by aditsu <ad...@yahoo.com>.
Nicolas Lalevée wrote:
> 
> Ivy doesn't support that kind of dependency per se.
> 
> But I had a similar case when implementing the OSGi support for Ivy. [...]
> 

Well, I currently don't want to have anything to do with OSGi, I'm looking
for this feature directly in Ivy.
If it's not there, then this is a feature request. I'd like to try to
implement it, but I really don't know when I can find the time.

Thanks
Adrian

--
View this message in context: http://ant.1045680.n5.nabble.com/Ivy-virtual-dependencies-tp4310341p4312779.html
Sent from the Ant - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Ivy virtual dependencies

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 18 avr. 2011 à 11:50, aditsu a écrit :

> Hi, is it possible in Ivy to define a dependency that can be satisfied by any
> one of several modules?
> Specifically, the dependency would refer to certain functionality required
> by the current module, and other modules would declare that they
> satisfy/implement that functionality.
> The concept is similar to "virtual packages" in various Linux distros.
> This "virtual dependency" would not refer to any specific piece of code,
> except it could default to one implementation if no other module that
> satisfies the dependency is pulled through the other dependencies.

Ivy doesn't support that kind of dependency per se.

But I had a similar case when implementing the OSGi support for Ivy. In OSGI, each bundle have a symbolic name and a version, which map well on Ivy's organisation+name+revision. But each bundle can expose its packages (sort of declaring its API), and can requires a package. Hence it can requires an implementation of an API. This is the same kind of indirection you describe.

To implement the OSGi support, I implemented a special resolver to which has the knowledge of a entire repository and can thus find a concrete module for a requirement. This is kind of experimental what I implemented because this is sort of fooling Ivy core and its model. Maybe a proper implementation is to make Ivy aware of such indirection, but this might be some tough job.

Nicolas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org