ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garima Bathla <garima.bat...@gmail.com>
Subject Re: Dynamic revisions using rev="latest.integration" and latest-strategies
Date Fri, 16 Oct 2009 16:43:28 GMT
Keith:

I think you are not wrong at all in what you described and Ivy is actually
doing what you are asking for it. So I would ask you to debug this problem
by looking into following points

1. What is the value of the attribute "publication date" in ivy.xml info
element for
         1.0.2 (status = "integration")
        latest (status = "integration")

Make sure the publication date is set correctly and according to dependency
resolution you expect. So for the module with revision='latest' publication
date should be latest than module with revision='1.0.2'

(* I really hope Ivy is not using filesystem dates for comparison)

2. As you have specified the latest-strategy to be latest-time, so Ivy is
indeed using it. Now if the module with revision='latest' is not being
picked up , that just implies that it is actually not the latest revision.
For you to make sure that the module with revision="latest" is always
treated as the latest module, you can assign a special meaning to the
keyword latest in ivysettings.xml



<latest-strategies>
  <latest-revision name="mylatest-revision">
    <specialMeaning name="latest" value="100"/>
  </latest-revision>
</latest-strategies>


So this way when comparing the revision 1.0.2 and latest, latest will
have the value of 100 and hence will be returned as per the
latest-time strategy.


Regards,
Garima.


On Mon, Oct 12, 2009 at 9:22 AM, Keith Hatton <
keith.hatton@publishingtechnology.com> wrote:

> Hi all,
>
> I am new to Ivy, so maybe I am missing something or my understanding is not
> quite right. Hopefully someone will be able to point me in the right
> direction.
>
> I have Ivy working fine when dependencies are all defined as fixed
> revisions. But I'm not getting the expected result when I change to use a
> dynamic revision.
>
> In my project's ivy.xml I define a dependency:
>    <dependency org="[myorg]" name="[mydep]" rev="latest.integration"
> conf="[myconf]->[otherconf]"/>
>
> The ivy repository contains 3 revisions of the [mydep] artifacts. In
> increasing order of timestamps, they are:
>    1.0.1 (status = "release")
>    1.0.2 (status = "integration")
>    latest (status = "integration")
>
> If I change my project's dependency to be on "latest.release", I see from
> the Ant/Ivy output that 1.0.2 is correctly rejected because its status is
> integration, and 1.0.1 is used.
> But when I use "latest.integration", I see no evidence that Ivy has even
> considered the "latest" version. It only looks at 1.0.2.
>
> (Fragment of ant -debug output:)
>
> [ivy:retrieve]  using local-sandbox to list all in [blah]
> [ivy:retrieve]          found 3 resources
> [ivy:retrieve]  found revs: [1.0.1, 1.0.2, latest]
> [ivy:retrieve]  local-sandbox: found md file for
> [myorg]#[mydep];latest.integration
> [ivy:retrieve]          => [blah]\1.0.2\ivys\ivy.xml (1.0.2)
>
> If I remove 1.0.2, so that the choice is between "latest" and 1.0.1, Ivy
> picks 1.0.1. If I remove all the numbered versions from the repository so
> that "latest" is the only one available, Ivy is quite happy to work with
> that, so I guess it must be something in the way Ivy chooses which of the
> available revisions to use.
>
> My ivysettings.xml contains the following, which I had hoped would ensure
> that the most recent build would always be favoured:
>   <latest-strategies>
>      <latest-time/>
>   </latest-strategies>
>
> Rationale: I am trying to avoid having any version "number" in the latest
> build, because I feel it is quite error prone, so prefer something that is
> distinct from the release numbering.
>
> I'm using Ivy 2.1.0-rc2.
>
> Thanks for any suggestions,
> Keith
>
>
>
>
> <file:///C:/Documents%20and%20Settings/khatton/Application%20Data/Microsoft/
> Signatures/www.publishingtechnology.com> www.publishingtechnology.com
>
> Publishing Technology plc is registered in England No. 837205.
>
> Registered Office: Unipart House, Garsington Road, Oxford OX4 2GQ
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message