Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 66750 invoked from network); 12 Feb 2010 22:32:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Feb 2010 22:32:27 -0000 Received: (qmail 73899 invoked by uid 500); 12 Feb 2010 22:32:27 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 73817 invoked by uid 500); 12 Feb 2010 22:32:26 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 73807 invoked by uid 99); 12 Feb 2010 22:32:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Feb 2010 22:32:26 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Feb 2010 22:32:18 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Ng43K-00028W-3B for dev@ant.apache.org; Fri, 12 Feb 2010 14:31:58 -0800 Message-ID: <27570250.post@talk.nabble.com> Date: Fri, 12 Feb 2010 14:31:58 -0800 (PST) From: Carl Quinn To: dev@ant.apache.org Subject: Re: Possible issue in LatestVersionMatcher.needModuleDescriptor In-Reply-To: <27525855.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: carl.quinn@gmail.com References: <27525855.post@talk.nabble.com> I've filed an issue for this: https://issues.apache.org/jira/browse/IVY-1170 Carl Quinn wrote: > > While tracking down some unexpected behavior in our Ivy-based build > system, I ran across what looks like a bug in > LatestVersionMatcher.needModuleDescriptor(). In that method, it has a > hard-coded check for "latest.integration" to determine when to not require > a module descriptor. > > public boolean needModuleDescriptor(ModuleRevisionId askedMrid, > ModuleRevisionId foundMrid) { > return !"latest.integration".equals(askedMrid.getRevision()); > } > > In our case, we have redefined our status to be the maven-like: > > > > > > > And this LatestVersionMatcher then fails to allow "latest.snapshot" to > grab artifacts w/o module descriptors. (all those old jars that I haven't > Ivy-fied yet :) > > I'm not that familiar with the Ivy source, but is there a way for this > class to get the lowest priority status instead of hard coding it? > Something like: > > public boolean needModuleDescriptor(ModuleRevisionId askedMrid, > ModuleRevisionId foundMrid) { > List statuses = StatusManager.getCurrent().getStatuses(); > Status lowest = (Status) statuses.get(statuses.size() - 1); > String latestLowest = "latest." + lowest.getName(); > return !lowest.isIntegration() || > !latestLowest.equals(askedMrid.getRevision()); > } > > thanks, > --carl > > -- View this message in context: http://old.nabble.com/Possible-issue-in-LatestVersionMatcher.needModuleDescriptor-tp27525855p27570250.html Sent from the Ant - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org