Return-Path: Delivered-To: apmail-ant-ivy-user-archive@www.apache.org Received: (qmail 60303 invoked from network); 8 Mar 2009 19:06:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Mar 2009 19:06:51 -0000 Received: (qmail 18460 invoked by uid 500); 8 Mar 2009 19:06:50 -0000 Delivered-To: apmail-ant-ivy-user-archive@ant.apache.org Received: (qmail 18432 invoked by uid 500); 8 Mar 2009 19:06:50 -0000 Mailing-List: contact ivy-user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ivy-user@ant.apache.org Delivered-To: mailing list ivy-user@ant.apache.org Received: (qmail 18421 invoked by uid 99); 8 Mar 2009 19:06:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Mar 2009 12:06:50 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gscokart@gmail.com designates 209.85.218.175 as permitted sender) Received: from [209.85.218.175] (HELO mail-bw0-f175.google.com) (209.85.218.175) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Mar 2009 19:06:43 +0000 Received: by bwz23 with SMTP id 23so877241bwz.28 for ; Sun, 08 Mar 2009 12:06:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=UcWtqZ6kxmVA+aO/wLoDEeoKhyanfvB015YnuGYCFao=; b=VcsPNKNJJ8H5sxzeEJHURAvkXF/0P8Fx7U1ypoBOW+epO5eM488ekT2z07sgaAjU6S JcTTYXm6xB3PIJbO5BEnXyq4GntyacI5/Z+lz3VCO5VBBL1XdGBSMT1mKXVQgGNDYShl M4ZaBj4211mpHGtPlsK1XzjTqaEXmhC9aexIU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=smuH5a0pgA9v3v2mnxYJZwcvrEVzY1XxA8VMl6kVgTKTpPvYTgUK8C43TP5c6yMzBR bJPtH060NWGn+83+pLKbXtJPKCLkkX9oqzI0RXHzX25zbstrUNz7Kts/cMqSyBqy5s/9 +EVs2cyaQqhhcNRhjXbi/5dnWjlbdB3PpD5rI= MIME-Version: 1.0 Received: by 10.223.121.6 with SMTP id f6mr3839432far.77.1236539181508; Sun, 08 Mar 2009 12:06:21 -0700 (PDT) In-Reply-To: <1019183757.20090308152429@freemail.hu> References: <1019183757.20090308152429@freemail.hu> Date: Sun, 8 Mar 2009 20:06:21 +0100 Message-ID: Subject: Re: Chain resolver chaos with local dependency overrides From: Gilles Scokart To: ivy-user@ant.apache.org, Daniel Dekany Content-Type: multipart/alternative; boundary=001636c5bb71aa2be90464a03629 X-Virus-Checked: Checked by ClamAV on apache.org --001636c5bb71aa2be90464a03629 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I do somthing similar. When a developper has finish to play with a local dependency he must clean his local repository, clean his cache and re-execute a resolve. Not very nice, but in my context it seems to be OK (we rarely have to play with local dependencies). Gilles Scokart 2009/3/8 Daniel Dekany > I have a chain-resolver that contains a filesystem-resolver and an > url-resolver. The filesystem-resolver is local to the developer's > workstation, while the url-resolver points to a webserver that is > common for all developers. Normally, Ivy just grabs all dependencies > from the webserver, but sometimes a developer wants to play locally > with a bleeding edge version of a *dependency* (which is not yet on > the webserver), so he publishes that with the filesystem-resolver, so > only on his workstation Ivy will use that from then. So far so good... > The problem is with using the version on the webserver again. I tried > two approaches: > > (a) Ivy should always check both repositories, and chose the version > of the module that is the latest. With a chain and the default > returnFirst="false" this works as far as the revision "number" of > the older and newer stuff differs, but if only the publication > date differs (like for two snapshots) Ivy always chooses the > revision returned by the earlier resolver of the chain. It does > so despite . I checked that Ivy > downloads and parses the ivy.xml-s from both Ivy repositories, and > that both XML contains correct , yet Ivy > always says that the one downloaded last was the older. That's > despite that from the publication attributes it's obvious that it > isn't so. Bug? > > (b) After (a) failed, I decided that the filesystem-resolver will have > priority over the url-resolver (i.e., returnFirst="true"), and I > add an Ant task for un-publishing from the filesystem-resolver. > (This last is needed for (a) too anyway.) First of all, there is > no ivy:unpublish. Luckily I defined and control the > filesystem-resolver, so I know what to ant-, so this part > is worked around in this case. The problem is, after deleting from > the filesystem-resolver, Ivy still find the module there through > the cache. Shouldn't > effectively bypass the cache? I checked it, and it kind of did. > Ivy tries to open the files in the repository, and it realizes > they are not there anymore. But then instead of continuing with > the next resolver in the chain, it uses the cached copy of those > files that it *knows* to be non-existent. I mean, a cache should > reflect what it caches as precisely as it can, as far as it > doesn't defeat the performance, and in this case the > performance-defeating slow I/O was already done, so why the cache > doesn't reflex the new situation? Bug? > > And, the point... I guess I try to address a fairly common use-case > here. What solution you guys use for this? (I try to rely on > ivy:cachepath instead of ivy:retrieve.) > > -- > Best regards, > Daniel Dekany > > --001636c5bb71aa2be90464a03629--