Artifact artifact = new DefaultArtifact(mrid, null, "ivy", "ivy", "xml"); String revisionToken = mrid.getRevision().startsWith("latest.")?"[any "+mrid.getRevision().substring("latest.".length())+"]":"["+mrid.getRevision()+"]"; Artifact latestArtifact = new DefaultArtifact(new ModuleRevisionId(mrid.getModuleId(), revisionToken, mrid.getExtraAttributes()), new Date(), "ivy", "ivy", "xml"); if (_ivyPatterns.isEmpty()) { logIvyAttempt("no ivy pattern => no attempt to find ivy file for "+mrid); } else { for (Iterator iter = _ivyPatterns.iterator(); iter.hasNext();) { String pattern = (String)iter.next(); String resolvedFileName = IvyPatternHelper.substitute(pattern, artifact); logIvyAttempt(resolvedFileName); if (!mrid.isExactRevision()) { resolvedFileName = IvyPatternHelper.substitute(pattern, latestArtifact); logIvyAttempt(resolvedFileName); } } }
Artifact artifact = DefaultArtifact.newIvyArtifact(mrid, null); logMdNotFound(mrid, artifact);
    protected void logIvyNotFound(ModuleRevisionId mrid) {        Artifact artifact = new DefaultArtifact(mrid, null, "ivy", "ivy", "xml");        String revisionToken = mrid.getRevision().startsWith("latest.")?"[any "+mrid.getRevision().substring("latest.".length())+"]":"["+mrid.getRevision()+"]";        Artifact latestArtifact = new DefaultArtifact(new ModuleRevisionId(mrid.getModuleId(), revisionToken, mrid.getExtraAttributes()), new Date(), "ivy", "ivy", "xml");        if (_ivyPatterns.isEmpty()) {            logIvyAttempt("no ivy pattern => no attempt to find ivy file for "+mrid);        } else {            for (Iterator iter = _ivyPatterns.iterator(); iter.hasNext();) {                String pattern = (String)iter.next();                String resolvedFileName = IvyPatternHelper.substitute(pattern, artifact);                logIvyAttempt(resolvedFileName);                if (!mrid.isExactRevision()) {                    resolvedFileName = IvyPatternHelper.substitute(pattern, latestArtifact);                    logIvyAttempt(resolvedFileName);                }            }        }    }