ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carl Quinn <carl.qu...@gmail.com>
Subject Re: Possible issue in LatestVersionMatcher.needModuleDescriptor
Date Fri, 12 Feb 2010 22:31:58 GMT

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:
> 
>     <statuses default="snapshot">
>         <status name="release" integration="false"/>
>         <status name="snapshot" integration="true"/>
>     </statuses>
> 
> 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


Mime
View raw message