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-tp27525855p27525855.html
Sent from the Ant - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]