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 Dave <da...@gmail.com> on 2008/06/16 14:48:05 UTC

Ivy:retrieve not picking up new jars

Hey all,
I've got 3 modules which are interdependent
Module A depends on Module B which in turn depends on Module C revision N.

I updated Module B's ivy.xml to depend on a newer version of Module C, but
the <ivy:retrieve> command keeps using revision N instead of N+1.
How can I tell Ivy to re-resolve the dependency revisions every time I call
a retrieve?

If you need any more info, let me know.


Regards,
Dave

-- 
There are 10 types of people in the world.
Those who understand binary and those who do not.

RE: Ivy:retrieve not picking up new jars

Posted by "Fernandes, Gerard" <ge...@lehman.com>.
I think your problem arises because of the following:

Module-A <depends on> Module-B <depends on> Module C

Now you've changed Module C and rebuilt it and published it to the Ivy
repo.

Following this, you'd expect Module-A to pull in the latest Module-C.
But in reality, Module-A depends on Module-B which has not changed. So
at this point, Ivy decides against fetching "new" stuff from the Ivy
repo and instead uses old stuff from your local cache.

IMO, you'd have to build and publish Module-B as well. And even then,
you'll have to set up Ivy so that it always checks for new versions in
the repository - I think there's a way to make it check by artefact
time-stamp.



-----Original Message-----
From: Dave [mailto:davidcorley@gmail.com] 
Sent: 16 June 2008 15:30
To: ivy-user@ant.apache.org
Subject: Re: Ivy:retrieve not picking up new jars

I'll work around the issue using one of your suggested methods. I can't
understand why I'm able to recursively resolve everything when nothing
is in the cache, but once a revision is in the cache, a dependency on a
newer revision cannot be resolved. It's counter-intuitive (as you say)
and unexpected behaviour surely?
i.e., the first time I resolved Module A, it got everything I needed
down through the dependency tree.
However, once that first resolve is carried out, there's no way to allow
for the fact that a dependency of a dependency will change revision?
Surely that's an Ivy bug?


On Mon, Jun 16, 2008 at 3:01 PM, Colin Fleming
<co...@gmail.com>
wrote:

> Unfortunately, yes - as far as I know there's no way to recursively 
> resolve all dependent modules. This is something I've always found 
> pretty confusing - sometimes it seems counterintuitive. Check out the 
> buildlist task - it will run an action for a list of modules in 
> dependency order, and thus you're guaranteed to always have your 
> dependencies resolved.
>
> Cheers,
> Colin
>
> 2008/6/16 Dave <da...@gmail.com>:
> > I resolved Module A with the refresh attribute set to true.
> > I though this would transitively resolve Module B? Am I wrong?
> >
> > On Mon, Jun 16, 2008 at 2:36 PM, Colin Fleming <
> colin.mailinglist@gmail.com>
> > wrote:
> >
> >> Hey Dave,
> >>
> >> Have you resolved module B after updating its dependencies? 
> >> Resolution will place the resolved ivy file with the updated 
> >> dependencies in the cache, and then module A should pick it up.
> >>
> >> Cheers,
> >> Colin
> >>
> >> 2008/6/16 Dave <da...@gmail.com>:
> >> > Hey all,
> >> > I've got 3 modules which are interdependent Module A depends on 
> >> > Module B which in turn depends on Module C
> revision
> >> N.
> >> >
> >> > I updated Module B's ivy.xml to depend on a newer version of 
> >> > Module C,
> >> but
> >> > the <ivy:retrieve> command keeps using revision N instead of N+1.
> >> > How can I tell Ivy to re-resolve the dependency revisions every 
> >> > time I
> >> call
> >> > a retrieve?
> >> >
> >> > If you need any more info, let me know.
> >> >
> >> >
> >> > Regards,
> >> > Dave
> >> >
> >> > --
> >> > There are 10 types of people in the world.
> >> > Those who understand binary and those who do not.
> >> >
> >>
> >
> >
> >
> > --
> > There are 10 types of people in the world.
> > Those who understand binary and those who do not.
> >
>



--
There are 10 types of people in the world.
Those who understand binary and those who do not.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

This message is intended only for the personal and confidential use of the designated recipient(s) named above.  If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited.  This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such.  All information is subject to change without notice.


Re: Ivy:retrieve not picking up new jars

Posted by Colin Fleming <co...@gmail.com>.
I'm not sure how you do your versioning, but I think that when you
bump the version of C in the ivy file of B, you also need to change
the version of B (since the versions are really part of the config of
the module - change one of your dependencies and you have to change
the version of the dependent as well). This might be complicated if
you're using snapshots - the problem is that when Ivy gets the
dependent ivy files, it gets them from the cache, and without
explicitly resolving B with the new dependency in a snapshot situation
that won't be updated.

Cheers,
Colin

Re: Ivy:retrieve not picking up new jars

Posted by Dave <da...@gmail.com>.
I'll work around the issue using one of your suggested methods. I can't
understand why I'm able to recursively resolve everything when nothing is in
the cache, but once a revision is in the cache, a dependency on a newer
revision cannot be resolved. It's counter-intuitive (as you say) and
unexpected behaviour surely?
i.e., the first time I resolved Module A, it got everything I needed down
through the dependency tree.
However, once that first resolve is carried out, there's no way to allow for
the fact that a dependency of a dependency will change revision? Surely
that's an Ivy bug?


On Mon, Jun 16, 2008 at 3:01 PM, Colin Fleming <co...@gmail.com>
wrote:

> Unfortunately, yes - as far as I know there's no way to recursively
> resolve all dependent modules. This is something I've always found
> pretty confusing - sometimes it seems counterintuitive. Check out the
> buildlist task - it will run an action for a list of modules in
> dependency order, and thus you're guaranteed to always have your
> dependencies resolved.
>
> Cheers,
> Colin
>
> 2008/6/16 Dave <da...@gmail.com>:
> > I resolved Module A with the refresh attribute set to true.
> > I though this would transitively resolve Module B? Am I wrong?
> >
> > On Mon, Jun 16, 2008 at 2:36 PM, Colin Fleming <
> colin.mailinglist@gmail.com>
> > wrote:
> >
> >> Hey Dave,
> >>
> >> Have you resolved module B after updating its dependencies? Resolution
> >> will place the resolved ivy file with the updated dependencies in the
> >> cache, and then module A should pick it up.
> >>
> >> Cheers,
> >> Colin
> >>
> >> 2008/6/16 Dave <da...@gmail.com>:
> >> > Hey all,
> >> > I've got 3 modules which are interdependent
> >> > Module A depends on Module B which in turn depends on Module C
> revision
> >> N.
> >> >
> >> > I updated Module B's ivy.xml to depend on a newer version of Module C,
> >> but
> >> > the <ivy:retrieve> command keeps using revision N instead of N+1.
> >> > How can I tell Ivy to re-resolve the dependency revisions every time I
> >> call
> >> > a retrieve?
> >> >
> >> > If you need any more info, let me know.
> >> >
> >> >
> >> > Regards,
> >> > Dave
> >> >
> >> > --
> >> > There are 10 types of people in the world.
> >> > Those who understand binary and those who do not.
> >> >
> >>
> >
> >
> >
> > --
> > There are 10 types of people in the world.
> > Those who understand binary and those who do not.
> >
>



-- 
There are 10 types of people in the world.
Those who understand binary and those who do not.

Re: Ivy:retrieve not picking up new jars

Posted by Colin Fleming <co...@gmail.com>.
Unfortunately, yes - as far as I know there's no way to recursively
resolve all dependent modules. This is something I've always found
pretty confusing - sometimes it seems counterintuitive. Check out the
buildlist task - it will run an action for a list of modules in
dependency order, and thus you're guaranteed to always have your
dependencies resolved.

Cheers,
Colin

2008/6/16 Dave <da...@gmail.com>:
> I resolved Module A with the refresh attribute set to true.
> I though this would transitively resolve Module B? Am I wrong?
>
> On Mon, Jun 16, 2008 at 2:36 PM, Colin Fleming <co...@gmail.com>
> wrote:
>
>> Hey Dave,
>>
>> Have you resolved module B after updating its dependencies? Resolution
>> will place the resolved ivy file with the updated dependencies in the
>> cache, and then module A should pick it up.
>>
>> Cheers,
>> Colin
>>
>> 2008/6/16 Dave <da...@gmail.com>:
>> > Hey all,
>> > I've got 3 modules which are interdependent
>> > Module A depends on Module B which in turn depends on Module C revision
>> N.
>> >
>> > I updated Module B's ivy.xml to depend on a newer version of Module C,
>> but
>> > the <ivy:retrieve> command keeps using revision N instead of N+1.
>> > How can I tell Ivy to re-resolve the dependency revisions every time I
>> call
>> > a retrieve?
>> >
>> > If you need any more info, let me know.
>> >
>> >
>> > Regards,
>> > Dave
>> >
>> > --
>> > There are 10 types of people in the world.
>> > Those who understand binary and those who do not.
>> >
>>
>
>
>
> --
> There are 10 types of people in the world.
> Those who understand binary and those who do not.
>

Re: Ivy:retrieve not picking up new jars

Posted by Dave <da...@gmail.com>.
I resolved Module A with the refresh attribute set to true.
I though this would transitively resolve Module B? Am I wrong?

On Mon, Jun 16, 2008 at 2:36 PM, Colin Fleming <co...@gmail.com>
wrote:

> Hey Dave,
>
> Have you resolved module B after updating its dependencies? Resolution
> will place the resolved ivy file with the updated dependencies in the
> cache, and then module A should pick it up.
>
> Cheers,
> Colin
>
> 2008/6/16 Dave <da...@gmail.com>:
> > Hey all,
> > I've got 3 modules which are interdependent
> > Module A depends on Module B which in turn depends on Module C revision
> N.
> >
> > I updated Module B's ivy.xml to depend on a newer version of Module C,
> but
> > the <ivy:retrieve> command keeps using revision N instead of N+1.
> > How can I tell Ivy to re-resolve the dependency revisions every time I
> call
> > a retrieve?
> >
> > If you need any more info, let me know.
> >
> >
> > Regards,
> > Dave
> >
> > --
> > There are 10 types of people in the world.
> > Those who understand binary and those who do not.
> >
>



-- 
There are 10 types of people in the world.
Those who understand binary and those who do not.

Re: Ivy:retrieve not picking up new jars

Posted by Colin Fleming <co...@gmail.com>.
Hey Dave,

Have you resolved module B after updating its dependencies? Resolution
will place the resolved ivy file with the updated dependencies in the
cache, and then module A should pick it up.

Cheers,
Colin

2008/6/16 Dave <da...@gmail.com>:
> Hey all,
> I've got 3 modules which are interdependent
> Module A depends on Module B which in turn depends on Module C revision N.
>
> I updated Module B's ivy.xml to depend on a newer version of Module C, but
> the <ivy:retrieve> command keeps using revision N instead of N+1.
> How can I tell Ivy to re-resolve the dependency revisions every time I call
> a retrieve?
>
> If you need any more info, let me know.
>
>
> Regards,
> Dave
>
> --
> There are 10 types of people in the world.
> Those who understand binary and those who do not.
>