ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Carlton" <Carlton.Br...@compucredit.com>
Subject RE: How to prevent "unknown resolver" errors?
Date Wed, 11 Mar 2009 16:26:04 GMT
It's documented, although the implications are not explained enough.
http://ant.apache.org/ivy/history/latest-release/concept.html#cache 

The subtle part is that Ivy actually uses 2 caches, a resolution cache
and a repository cache.   The repository cache is what you're setting
when assign the cache attribute to a resolver.   The resolution cache,
on the other hand, is unique and is not to be used concurrently even
between processes using the same configuration.   If you need to have
distinct resolution caches, then you have to set a default cache per
each ivysettings.xml.   If you do that, most likely you won't need to
specify a cache on each resolver.

-----Original Message-----
From: Daniel Dekany [mailto:ddekany@freemail.hu] 
Sent: Wednesday, March 11, 2009 12:19 PM
To: Brown, Carlton
Cc: ivy-user@ant.apache.org
Subject: Re: How to prevent "unknown resolver" errors?

Wednesday, March 11, 2009, 4:28:52 PM, Brown, Carlton wrote:

> Are you overriding the defaultCache attribute in your ivysettings 
> file, or are you just defining caches as attributes of resolvers?

Aha! I only set the last. I never realized that <caches
defaultCacheDir="..."> does what it does. It seems it solves the
problem, so thanks a lot! (I believe I read all the pages about the
concepts, but don't remember this things was addressed. If it isn't, it
should be.)

> -----Original Message-----
> From: Daniel Dekany [mailto:ddekany@freemail.hu]
> Sent: Monday, March 09, 2009 12:47 PM
> To: ivy-user@ant.apache.org
> Subject: How to prevent "unknown resolver" errors?
>
> I declared own cache for all resolvers that I use, and that solved 
> this problem for a while. But if I resolve something that is also in 
> the default cache of Ivy (I mean ${user.home}/.ivy2/cache) the project

> pollutes or otherwise access it, and that will cause "unknown
resolver"
> errors again.
>
> For example, I store ant#ant in my own repo, called "myResolver", 
> which uses its own cache. Still, if the default cache of Ivy also 
> contains ant#ant (same revision), when I ivy:resolve in my project, 
> ${user.home}/.ivy2/cache/ant/ant/ivydata-[revision].properties is 
> modified so that it's last line will be resolver=myResolver. Thus, 
> when something else than my project uses the ${user.home}/.ivy2/cache 
> later to get ant#ant, I get a "unknown resolver myResolver" error. Why

> does my project touch the default cache at all when I set a 
> project-specific cache for all resolvers that it uses?
>
> --
> Best regards,
>  Daniel Dekany
>
>
> -----------------------------------------
> ====================================================
> This message contains PRIVILEGED and CONFIDENTIAL information that is 
> intended only for use by the named recipient. If you are not the named

> recipient, any disclosure, dissemination, or action based on the 
> contents of this message is prohibited. In such case please notify us 
> and destroy and delete all copies of this transmission.  Thank you.
> ====================================================
>

--
Best regards,
 Daniel Dekany


Mime
View raw message