ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Carlton" <>
Subject RE: [solved] How to prevent "unknown resolver" errors?
Date Thu, 12 Mar 2009 13:23:16 GMT
 > -----Original Message-----
> From: Daniel Dekany [] 
> Sent: Wednesday, March 11, 2009 5:59 PM
> To: Daniel Dekany
> Subject: Re: [solved] How to prevent "unknown resolver" errors?
> Wednesday, March 11, 2009, 7:22:42 PM, Daniel Dekany wrote:
> > Wednesday, March 11, 2009, 5:26:04 PM, Brown, Carlton wrote:
> >> It's documented, although the implications are not 
> explained enough.
> >>
> >>
> >> The subtle part is that Ivy actually uses 2 caches, a resolution 
> >> cache and a repository cache.
> [snip]
> > But I guess I shouldn't use ${user.home}/.ivy2/cache as
> > *repository* cache either. Certainly some other projects 
> will use that 
> > too, and if they don't use lockStrategy="artifact-lock"... 
> and I bet 
> > most will not. Well, it's rarely a problem, as two projects 
> had to be 
> > built in parallel for that to be problem... but still, does it boil 
> > down to that most projects (or company) should use it's own caches 
> > (and not forgetting to set the *resolution* caches too)?
> [snip]
> To answer my above question... I now tried using separate 
> *resolution* caches for each ivysetting.xml-s, but with the 
> common per-user
> *repository* cache, ${user.home}/.ivy2/cache.  As the 
> ivysetting.xml-specific resolver names still get into 
> ${user.home}/.ivy2/cache (yes, into the *repository* cache 
> part of it), it can still cause "undefined resolver" errors 
> in *other* projects that use ${user.home}/.ivy2/cache too. It 
> doesn't cause errors in my project though, as it knows the 
> custom resolvers.

If you're getting this behavior, think you've either made an error in
configuration or uncovered a bug.   Could you post your respective
config files rather than describing what you did?  

> OK, so to recapitulate for the mail archives (experts please 
> correct where I'm mistaken):
> First, note that there is *repository* cache VS *resolution* cache:
> It seems to me, the only safe solution is using a separate
> *repository* cache for each ivysettings.xml (at least), but 
> it's enough to associate that cache with the custom resolvers 
> (not to the built-in resolvers like "default", "local" and 
> like; those you can <include> in your ivysettings.xml), so 
> the cache of the Ibiblio artifacts can still remain global. 
> Oh, and lockStrategy="artifact-lock" should not be forgotten 
> if the repository cache will be accessed concurrently.
> Also, if I get it right, you should use at least one 
> *resolution* cache per ivysettings.xml per user account, and 
> that you better associate to each resolvers, i.e. even to the 
> built-in ones. Actually I have to do it with even finer 
> granularity: I use one resolution cache per ivysettings.xml 
> per user account per project, because two projects that use 
> the same ivysettings.xml may be built in parallel (automated 
> integration builds on the server).

Without seeing your config files I may be missing something somewhere,
but this seems like just a very circuitous way of specifying different
default caches in each ivysettings file that you use.   This would
assign both the resolution cache and repository cache uniquely in each
settings file.  

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.

View raw message