ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carl Quinn <>
Subject Possible issue in LatestVersionMatcher.needModuleDescriptor
Date Wed, 10 Feb 2010 03:44:13 GMT

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"/>

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() ||


View this message in context:
Sent from the Ant - Dev mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message