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 Neil Lott <ne...@yahoo.com> on 2008/03/13 20:26:38 UTC
defaultLatestStrategy
Would someone explain how to accomplish this with ivy?
Here's my use case:
I have multiple modules that publish artifacts.
When they publish the revision number stays the same.
However, if they do publish I want other modules to recognize that a
new revision of the module has been published.
I tried this in my settings file with no luck.
<ivysettings>
<settings defaultResolver="chained" checkUpToDate="true"
defaultLatestStrategy="latest-time"/>
Neil
Re: defaultLatestStrategy
Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hello Neill,
It looks like this "changing" variable is an undocumented attribute of ivy:resolve. You may try it to see what it does.
I guess you would want changing=true
Of course this is just a guess from glancing at the code.
Regards,
Antoine
-------- Original-Nachricht --------
> Datum: Thu, 13 Mar 2008 16:53:23 -0600
> Von: Neil Lott <ne...@yahoo.com>
> An: ivy-user@ant.apache.org
> Betreff: Re: defaultLatestStrategy
> Hi Antoine,
>
> Thanks for the feedback.
>
> Its a decision our team has made that we want to keep the same version
> number until we branch and in our case it was a preference among the
> team as a whole.
>
> I tried the checkUpToDate -- here's my settings file and it looks like
> the cache always resolves to the old version.
>
> <ivysettings>
> <settings defaultResolver="chained" checkUpToDate="true"/>
>
> <caches default="twc-cache" checkUpToDate="true">
> <cache name="twc-cache" basedir="${ivy.cache.dir}"/>
> </caches>
>
> <resolvers>
> <chain name="chained">
> <filesystem name="local" checkmodified="true">
> <ivy pattern="${ivy.local.repository.dir}/[organisation]/[module]/
> [revision]/[module]-[revision].[ext]"/>
> <artifact pattern="${ivy.local.repository.dir}/
> [organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
> </filesystem>
> <filesystem name="shared" checkmodified="true">
> <ivy pattern="${server.root}/ivy/repository/[organisation]/[module]/
> [revision]/[module]-[revision].[ext]"/>
> <artifact pattern="${server.root}/ivy/repository/
> [organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
> </filesystem>
> </chain>
> </resolvers>
> </ivysettings>
>
> I also looked at the ivy:resolve task but didn't see the changing
> attribute in the 2.0.0.2 beta version or the 2.0.0.1 beta. I saw the
> changing variable that can be set, is that what you are referring to?
>
> Neil
>
>
> On Mar 13, 2008, at 4:37 PM, Antoine Levy-Lambert wrote:
>
> > Hello Neil,
> >
> > I do not know whether this is possible with ivy.
> >
> > I am using ivy in my project for about 40 applications and libraries.
> >
> > We are generating new build labels for each successful build and we
> > do not have this issue.
> >
> > Is there a particular reason why you are always using the same label ?
> >
> > There is an attribute changing for the ivy:resolve task, maybe this
> > is what you are looking for to tell ivy : I am using always the same
> > revision but what this revision is actually can change. Xavier ?
> >
> > In the settings file, the attribute checkUpToDate is defined as :
> > Indicates if date should be checked before retrieving artifacts from
> > cache
> >
> > It does not sound like it is interesting for this use case [but
> > maybe I am wrong].
> >
> > Regards,
> >
> > Antoine
> > -------- Original-Nachricht --------
> >> Datum: Thu, 13 Mar 2008 13:26:38 -0600
> >> Von: Neil Lott <ne...@yahoo.com>
> >> An: Ivy User User <iv...@ant.apache.org>
> >> Betreff: defaultLatestStrategy
> >
> >> Would someone explain how to accomplish this with ivy?
> >>
> >> Here's my use case:
> >>
> >> I have multiple modules that publish artifacts.
> >> When they publish the revision number stays the same.
> >> However, if they do publish I want other modules to recognize that a
> >> new revision of the module has been published.
> >>
> >> I tried this in my settings file with no luck.
> >>
> >> <ivysettings>
> >> <settings defaultResolver="chained" checkUpToDate="true"
> >> defaultLatestStrategy="latest-time"/>
> >>
> >>
> >> Neil
Re: defaultLatestStrategy
Posted by Neil Lott <ne...@yahoo.com>.
Hi Antoine,
Thanks for the feedback.
Its a decision our team has made that we want to keep the same version
number until we branch and in our case it was a preference among the
team as a whole.
I tried the checkUpToDate -- here's my settings file and it looks like
the cache always resolves to the old version.
<ivysettings>
<settings defaultResolver="chained" checkUpToDate="true"/>
<caches default="twc-cache" checkUpToDate="true">
<cache name="twc-cache" basedir="${ivy.cache.dir}"/>
</caches>
<resolvers>
<chain name="chained">
<filesystem name="local" checkmodified="true">
<ivy pattern="${ivy.local.repository.dir}/[organisation]/[module]/
[revision]/[module]-[revision].[ext]"/>
<artifact pattern="${ivy.local.repository.dir}/
[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
</filesystem>
<filesystem name="shared" checkmodified="true">
<ivy pattern="${server.root}/ivy/repository/[organisation]/[module]/
[revision]/[module]-[revision].[ext]"/>
<artifact pattern="${server.root}/ivy/repository/
[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
</filesystem>
</chain>
</resolvers>
</ivysettings>
I also looked at the ivy:resolve task but didn't see the changing
attribute in the 2.0.0.2 beta version or the 2.0.0.1 beta. I saw the
changing variable that can be set, is that what you are referring to?
Neil
On Mar 13, 2008, at 4:37 PM, Antoine Levy-Lambert wrote:
> Hello Neil,
>
> I do not know whether this is possible with ivy.
>
> I am using ivy in my project for about 40 applications and libraries.
>
> We are generating new build labels for each successful build and we
> do not have this issue.
>
> Is there a particular reason why you are always using the same label ?
>
> There is an attribute changing for the ivy:resolve task, maybe this
> is what you are looking for to tell ivy : I am using always the same
> revision but what this revision is actually can change. Xavier ?
>
> In the settings file, the attribute checkUpToDate is defined as :
> Indicates if date should be checked before retrieving artifacts from
> cache
>
> It does not sound like it is interesting for this use case [but
> maybe I am wrong].
>
> Regards,
>
> Antoine
> -------- Original-Nachricht --------
>> Datum: Thu, 13 Mar 2008 13:26:38 -0600
>> Von: Neil Lott <ne...@yahoo.com>
>> An: Ivy User User <iv...@ant.apache.org>
>> Betreff: defaultLatestStrategy
>
>> Would someone explain how to accomplish this with ivy?
>>
>> Here's my use case:
>>
>> I have multiple modules that publish artifacts.
>> When they publish the revision number stays the same.
>> However, if they do publish I want other modules to recognize that a
>> new revision of the module has been published.
>>
>> I tried this in my settings file with no luck.
>>
>> <ivysettings>
>> <settings defaultResolver="chained" checkUpToDate="true"
>> defaultLatestStrategy="latest-time"/>
>>
>>
>> Neil
Re: defaultLatestStrategy
Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hello Neil,
I do not know whether this is possible with ivy.
I am using ivy in my project for about 40 applications and libraries.
We are generating new build labels for each successful build and we do not have this issue.
Is there a particular reason why you are always using the same label ?
There is an attribute changing for the ivy:resolve task, maybe this is what you are looking for to tell ivy : I am using always the same revision but what this revision is actually can change. Xavier ?
In the settings file, the attribute checkUpToDate is defined as :
Indicates if date should be checked before retrieving artifacts from cache
It does not sound like it is interesting for this use case [but maybe I am wrong].
Regards,
Antoine
-------- Original-Nachricht --------
> Datum: Thu, 13 Mar 2008 13:26:38 -0600
> Von: Neil Lott <ne...@yahoo.com>
> An: Ivy User User <iv...@ant.apache.org>
> Betreff: defaultLatestStrategy
> Would someone explain how to accomplish this with ivy?
>
> Here's my use case:
>
> I have multiple modules that publish artifacts.
> When they publish the revision number stays the same.
> However, if they do publish I want other modules to recognize that a
> new revision of the module has been published.
>
> I tried this in my settings file with no luck.
>
> <ivysettings>
> <settings defaultResolver="chained" checkUpToDate="true"
> defaultLatestStrategy="latest-time"/>
>
>
> Neil
Re: defaultLatestStrategy
Posted by Xavier Hanin <xa...@gmail.com>.
On Thu, Mar 13, 2008 at 8:26 PM, Neil Lott <ne...@yahoo.com> wrote:
> Would someone explain how to accomplish this with ivy?
>
> Here's my use case:
>
> I have multiple modules that publish artifacts.
> When they publish the revision number stays the same.
> However, if they do publish I want other modules to recognize that a
> new revision of the module has been published.
>
> I tried this in my settings file with no luck.
>
> <ivysettings>
> <settings defaultResolver="chained" checkUpToDate="true"
> defaultLatestStrategy="latest-time"/>
Please check cache and change management section on main concept page.
Xavier
>
>
> Neil
>
--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/