Return-Path: Delivered-To: apmail-incubator-ivy-user-archive@locus.apache.org Received: (qmail 88372 invoked from network); 11 Nov 2007 11:58:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Nov 2007 11:58:06 -0000 Received: (qmail 87157 invoked by uid 500); 11 Nov 2007 11:57:53 -0000 Delivered-To: apmail-incubator-ivy-user-archive@incubator.apache.org Received: (qmail 87130 invoked by uid 500); 11 Nov 2007 11:57:53 -0000 Mailing-List: contact ivy-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ivy-user@incubator.apache.org Delivered-To: mailing list ivy-user@incubator.apache.org Received: (qmail 87121 invoked by uid 99); 11 Nov 2007 11:57:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Nov 2007 03:57:53 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [204.200.195.236] (HELO personeta.com) (204.200.195.236) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Nov 2007 11:58:38 +0000 Received: from eranbxp ([194.90.193.60]) (authenticated bits=0) by personeta.com (8.13.6.20060614/8.13.6) with ESMTP id lABBvVLP037800 for ; Sun, 11 Nov 2007 11:57:32 GMT Message-Id: <200711111157.lABBvVLP037800@personeta.com> From: "Eranb" To: Subject: RE: Ivy VersionRangeMatcher lower range bug [4.2.0.3,4.2.+] Date: Sun, 11 Nov 2007 13:58:08 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 thread-index: AcgkUK0WMGhVo6kmSg23D6GHDC7HtgACIKrw In-Reply-To: <635a05060711110249s6ef75273o13f81c311edb9452@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi Xavier, Thank you for your prompt reply. However, it seems that I was not very clear. I actually ment the lower bound. To be more specific - in case the version in the release repository is: 4.2.0.3 (just as the lower bound) it is rejected. It seems to me like it is a critical bug. For first release versions are never found. Further more - according to Ivy documentation for version range using '[' the first version should be included ! Thanks, Eran B. -----Original Message----- From: Xavier Hanin [mailto:xavier.hanin@gmail.com] Sent: Sunday, November 11, 2007 12:50 PM To: ivy-user@incubator.apache.org Subject: Re: Ivy VersionRangeMatcher lower range bug [4.2.0.3,4.2.+] Indeed, the version range matcher has not been thought to handle another dynamic revision as one bound, so I'm not surprised it doesn't work. Open an issue in JIRA, but IMO this is more an undocumented limitation than a bug. Xavier On Nov 11, 2007 10:50 AM, Eran Bartenstein wrote: > Hi, > > In my version it seems that there is a bug in the VersionRangeMatcher. > In case the found version is identical to the lower version it is being > discarded by the matcher and the jar is not found. > I checked in the code and it seems that there is a bug in the following > code: > > In VersionRangeMatcher (L:83) > > The following code doesn't return 0 in case the modules (art1,art2) are > identical in content but not in instances: > > private final Comparator COMPARATOR = new Comparator() { > public int compare(Object o1, Object o2) { > if (o1.equals(o2)) { > return 0; > } > ArtifactInfo art1 = new > MRIDArtifactInfo((ModuleRevisionId)o1); > ArtifactInfo art2 = new > MRIDArtifactInfo((ModuleRevisionId)o2); > ArtifactInfo art = > getLatestStrategy().findLatest(new ArtifactInfo[] {art1,art2}, null); > return art == art1 ? -1 : 1; > } > }; > > Thanks, > > Eran Bartenstein > SCE Team leader > > > 1 Hanagar Street > P.O.B. 7188 > Hod Hasharon 45241 Israel > * Phone : 972 9 7627734 > 7 Fax : 972 9 7412060 > * Eranb@personeta.com > www.personeta.com > > > Always look on the bright side of life, for: > 'you come from nothing, > you go back to nothing, > what did you lose ? > NOTHING' > (Monty Python) > > -- Xavier Hanin - Independent Java Consultant http://xhab.blogspot.com/ http://ant.apache.org/ivy/ http://www.xoocode.org/