ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jing Xue <>
Subject Re: why doesn't the chain stop at cache?
Date Wed, 04 Apr 2007 00:56:49 GMT
On Tue, Apr 03, 2007 at 07:41:38AM +0200, Xavier Hanin wrote:
> On 4/3/07, Jing Xue <> wrote:
> >After one successful resolve, everything is in the cache now. I thought
> >with returnFirst being true, it should not be going to ibiblio. Yet it
> >does for every dependency. What am I missing?
> It's weird, I'm using a build done on 20070330193957, with a very similar
> config, and it works as expected. Are you sure ivyx.returnFirst actually
> equals true? Turn on debug log and Ivy will dump your settings, you should
> see something like this:

Hi Xavier,

I did some more experimenting and found something interesting: 8-)

First I confirmed the ivyx.returnFirst property is in effect by
replacing it with literal "true", and got the same results.

Then I started with the same config (and the same 4/1 codebase):
  <property name="ivy.ibiblio.default.artifact.root" value=""
  <property name="ivyx.returnFirst" value="true" override="false" />
  <!--  <properties file="" /> -->
  <settings defaultResolver="main" checkUpToDate="true" />
    <chain name="main" returnFirst="${ivyx.returnFirst}">
      <cache name="cacheResolver" />
      <!-- <ivyrep name="ivyrep" />  -->
      <ibiblio name="ibiblioResolver" m2compatible="true" root=""

As I reported last time, for every dependency it would print out something

[ivy:resolve]   using main to resolve [ commons-logging | commons-logging | 1.1 ]
[ivy:resolve] pre 1.3 ivy file: using exactOrRegexp as default matcher
[ivy:resolve]   found ivy file in cache for [ commons-logging | commons-logging | 1.1 ] (resolved
by ibiblioResolver): /home/jingxue/.ivy/cache/commons-logging/commons-logging/ivy-1.1.xml
[ivy:resolve]   cacheResolver: revision in cache: [ commons-logging | commons-logging | 1.1
[ivy:resolve]   found [ commons-logging | commons-logging | 1.1 ] in ibiblioResolver

So I went to the config, _commented out_ the ibiblioResolver, 
ran it again, and _surprisingly_ got this error:

 unknown resolver ibiblioResolver

And I ran it again, _without_ making any changes, this time everything
worked out fine. It would print out:

[ivy:resolve]   found [ commons-logging | commons-logging | 1.1 ] in main

Then I went back into the config, _uncommented_ the ibiblioResolver,
i.e., reverting the config back to where I started, and everything just
continues to work fine: what's already in the cache is always shown as
"found in main" (well except those that I specified version patterns.
They always have to be resolved in ibiblio, but that's expected.)

Any thoughts? 8-)
Jing Xue

View raw message