Return-Path: Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: (qmail 40429 invoked from network); 5 Oct 2010 13:19:57 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Oct 2010 13:19:57 -0000 Received: (qmail 99338 invoked by uid 500); 5 Oct 2010 13:19:57 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 99253 invoked by uid 500); 5 Oct 2010 13:19:56 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 98760 invoked by uid 99); 5 Oct 2010 13:19:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Oct 2010 13:19:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Oct 2010 13:19:55 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o95DJYWW016504 for ; Tue, 5 Oct 2010 13:19:34 GMT Message-ID: <4438599.546381286284774911.JavaMail.jira@thor> Date: Tue, 5 Oct 2010 09:19:34 -0400 (EDT) From: =?utf-8?Q?Nicolas_Lalev=C3=A9e_=28JIRA=29?= To: notifications@ant.apache.org Subject: [jira] Updated: (IVY-1227) UseCacheOnly doesn't respect the cache configuration in the ivysettings In-Reply-To: <7974114.226641284639512549.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IVY-1227?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Nicolas Lalev=C3=A9e updated IVY-1227: --------------------------------- Fix Version/s: trunk > UseCacheOnly doesn't respect the cache configuration in the ivysettings > ----------------------------------------------------------------------- > > Key: IVY-1227 > URL: https://issues.apache.org/jira/browse/IVY-1227 > Project: Ivy > Issue Type: Bug > Components: Core > Affects Versions: 2.2.0-RC1 > Reporter: Nicolas Lalev=C3=A9e > Assignee: Nicolas Lalev=C3=A9e > Fix For: trunk > > Attachments: IVY-1227-r997376.patch, test-ivy-usecacheonly.zip > > > In my ivysettings.xml I have configured some cache which avoid having the= resolver use the common .ivy2 cache. If on the resolve task I set useCache= Only=3D"true", then my artifacts in the cache won't be found. > I'll attach a complete test case for the different scenario: > # defaultResolver=3D"ibiblio", useCacheOnly=3D"false", dependency on comm= on-logging-1.1: nominal behaviour, everything works fine, artifacts get dow= nloaded into .ivy2 > # defaultResolver=3D"ibiblio", useCacheOnly=3D"true", dependency on commo= n-logging-1.1: there is a bug in the CacheResolver, artifacts are not "down= loaded", they not found. It was a missing ensuredConfigured(). I'll commit = that as I am quite confident in that fix. With the fix, everything goes wel= l. > # defaultResolver=3D"chain", useCacheOnly=3D"false", dependency on common= -logging-1.2: it should be not be found in the ibiblio resolver but in the = local one. Everything works fine, it get cached correctly from the local re= po. > # defaultResolver=3D"chain", useCacheOnly=3D"true", dependency on common-= logging-1.2: it is not found. As I was debugging it, in fact the CacheResol= ver isn't configured with the proper cache manager, so it uses the default = one. So it looks in the wrong cache. > My proposal as the last fix is to not use the cache resolver as a dictato= r resolver when we want useCacheOnly. I don't see any obvious way to make c= ache resolver aware of the cache it should look into, further more when the= re is chaining. I suggest to move this logic in the configured resolvers. I= tried a very simple patch and it seems to work nicely. See the attached pa= tch. I am not confident enough to commit it without review as it might be q= uite incomplete or have some side effect. At least it works with some chain= ing and even if there is some useOrigin=3Dtrue --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.