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 Michael Laccetti <mi...@s2g.ca> on 2008/04/24 18:26:45 UTC
Dependencies and Global Excludes
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...
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.
Thanks,
Mike
-----
--
Michael Laccetti (416)558-9718
S2G Limited http://www.s2g.ca/
--
View this message in context: http://www.nabble.com/Dependencies-and-Global-Excludes-tp16851029p16851029.html
Sent from the ivy-user mailing list archive at Nabble.com.
Re: Dependencies and Global Excludes
Posted by Alan Chaney <al...@writingshow.com>.
Xavier Hanin wrote:
> On Thu, Apr 24, 2008 at 6:26 PM, Michael Laccetti <mi...@s2g.ca> 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.
>
>
+1 vote for that... I've just spent about 30mins trying to work out why
my dependency exclusion fails.
Re: Dependencies and Global Excludes
Posted by Gilles Scokart <gs...@gmail.com>.
On 25/04/2008, Xavier Hanin <xa...@gmail.com> wrote:
> On Thu, Apr 24, 2008 at 11:33 PM, Gilles Scokart <gs...@gmail.com> wrote:
>
> > On 24/04/2008, Xavier Hanin <xa...@gmail.com> wrote:
> > > On Thu, Apr 24, 2008 at 6:26 PM, Michael Laccetti <mi...@s2g.ca>
> > 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.
>
I agree that more thinking / experimenation is required. It is
certainly not something we should put in a 2.0. It would delay it too
much.
> Xavier
>
> >
> >
> >
> > --
> > Gilles Scokart
>
> >
>
>
>
> --
> Xavier Hanin - Independent Java Consultant
> http://xhab.blogspot.com/
> http://ant.apache.org/ivy/
> http://www.xoocode.org/
>
--
Gilles Scokart
Re: Dependencies and Global Excludes
Posted by Xavier Hanin <xa...@gmail.com>.
On Thu, Apr 24, 2008 at 11:33 PM, Gilles Scokart <gs...@gmail.com> wrote:
> On 24/04/2008, Xavier Hanin <xa...@gmail.com> wrote:
> > On Thu, Apr 24, 2008 at 6:26 PM, Michael Laccetti <mi...@s2g.ca>
> 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/
Re: Dependencies and Global Excludes
Posted by Gilles Scokart <gs...@gmail.com>.
On 24/04/2008, Xavier Hanin <xa...@gmail.com> wrote:
> On Thu, Apr 24, 2008 at 6:26 PM, Michael Laccetti <mi...@s2g.ca> 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.
--
Gilles Scokart
Re: Dependencies and Global Excludes
Posted by Xavier Hanin <xa...@gmail.com>.
On Fri, Apr 25, 2008 at 2:53 AM, Michael Laccetti <mi...@s2g.ca> wrote:
> Xavier Hanin wrote:
>
>> 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.
>>
>
> https://issues.apache.org/jira/browse/IVY-808 :)
>
> 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. So you can either ensure more consistent names
>> with
>> a namespace (both versions of spring-ldap should have the same org), or
>> use
>> global exclude:
>>
>> <ivy-module version="2.0">
>> [...]
>> <dependencies>
>> [put your dependencies here]
>> <exclude org="org.spring"
>> module="spring-ldap" rev="1.1.2" />
>> </dependencies>
>> </ivy-module>
>>
>> HTH,
>>
>> Xavier
>>
>
> (Spring must have changed the package structure; if I could fix that, I
> would.)
>
> That does seem like a good feature, just wondering if you'll push a beta 3
> release, or do some sort of snapshot? This goes +10 for IvyDE; pointing
> co-workers to random builds hosted on places that I read about via e-mail
> doesn't really help me convince them that it is stable for production use.
> :)
I understand. Our next target release was supposed to be 2.0 RC1, but we're
still struggling with some bug fixes. Maybe we should consider releasing a
beta 3 if it takes too long to get RC1 out.
Xavier
>
>
> Mike
>
--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/
Re: Dependencies and Global Excludes
Posted by Michael Laccetti <mi...@s2g.ca>.
Xavier Hanin wrote:
> 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.
https://issues.apache.org/jira/browse/IVY-808 :)
> 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. So you can either ensure more consistent names with
> a namespace (both versions of spring-ldap should have the same org), or use
> global exclude:
>
> <ivy-module version="2.0">
> [...]
> <dependencies>
> [put your dependencies here]
>
> <exclude org="org.spring" module="spring-ldap"
> rev="1.1.2" />
> </dependencies>
> </ivy-module>
>
> HTH,
>
> Xavier
(Spring must have changed the package structure; if I could fix that, I
would.)
That does seem like a good feature, just wondering if you'll push a beta
3 release, or do some sort of snapshot? This goes +10 for IvyDE;
pointing co-workers to random builds hosted on places that I read about
via e-mail doesn't really help me convince them that it is stable for
production use. :)
Mike
Re: Dependencies and Global Excludes
Posted by Xavier Hanin <xa...@gmail.com>.
On Thu, Apr 24, 2008 at 6:26 PM, Michael Laccetti <mi...@s2g.ca> 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. So you can either ensure more consistent names with
a namespace (both versions of spring-ldap should have the same org), or use
global exclude:
<ivy-module version="2.0">
[...]
<dependencies>
[put your dependencies here]
<exclude org="org.spring" module="spring-ldap" rev="1.1.2" />
</dependencies>
</ivy-module>
HTH,
Xavier
>
>
> Thanks,
>
> Mike
>
> -----
> --
> Michael Laccetti (416)558-9718
> S2G Limited http://www.s2g.ca/
> --
> View this message in context:
> http://www.nabble.com/Dependencies-and-Global-Excludes-tp16851029p16851029.html
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>
--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/