On Thu, Apr 24, 2008 at 11:33 PM, Gilles Scokart <[EMAIL PROTECTED]> wrote:
> On 24/04/2008, Xavier Hanin <[EMAIL PROTECTED]> wrote: > > On Thu, Apr 24, 2008 at 6:26 PM, Michael Laccetti <[EMAIL PROTECTED]> > wrote: > > > > > > > > Two questions: > > > > > > 1) Is there any way to see the transitive dependencies? My current > build > > > is > > > failing because Ivy is trying to pull down com.sun#ldapbp;1.0, which > isn't > > > in the Maven repository. The only problem is that I cannot find where > this > > > is coming from, so I cannot block it and feed in the > > > com.sun.jndi.ldap#ldapbp;1.0 dependency instead. Which leads to part > > > two... > > > > > > I think you can see it in verbose or debug mode, but it's not obvious. > > logging the depender(s) when a dependency is not found would be a nice > > improvement. You can open an issue if you like. > > > > > > > > > > > > > > > 2) How can I block dependencies for the entire project? Similar to > the > > > first question, something is trying to pull in > > > org.spring#spring-ldap#1.1.2, > > > which has some POM hashing issues. So, I'm trying to pull in > > > org.springframework.ldap#spring-ldap;1.2.1 instead. I just need to > know > > > how > > > to block the one and use the other. > > > > > > I'll answer with a trunk feature (which has changed since beta 2). The > > easiest is to override the version required, instead of excluding / > adding. > > This can be achieved like this: > > > > <ivy-module version="2.0"> > > [...] > > <dependencies> > > [put your dependencies here] > > > > <override org="org.spring" module="spring-ldap" > rev="1.2.1" /> > > </dependencies> > > </ivy-module> > > > > But I just notice that you ask to override the organization too, which > is > > not possible currently. > > Hey, you gave me an idea... > Shouldn't we have : > <ivy-module version="2.0"> > [...] > <dependencies> > [put your dependencies here] > > <substitute org="com.sun.jndi.ldap" module="ldapbp" rev="1.0" > /> > <replacement org="org.spring" module="spring-ldap" > rev="1.2.1" /> > </substitution> > </dependencies> > </ivy-module> > > I don't think that was the inital question, nor that this specific > example make sense. But the use case sounds realistics. You want to > replace a transitive dependency by an other module which can be an > other packaging of the same module, a derivative version of it, or > just an other implementation of a given interface. > > We may have to think a little bit further what it means in case of > conflict or in case of 'diamond' dependencies, but that seems > interresting. Yes, it could be interesting in some cases, but you can really do very strange things with this. I think it requires more thinking, and is not a high priority feature (since there's a workaround). Unless you need it for your Ivy usage Gilles. Xavier > > > > -- > Gilles Scokart > -- Xavier Hanin - Independent Java Consultant http://xhab.blogspot.com/ http://ant.apache.org/ivy/ http://www.xoocode.org/
