ModuleId mid = (ModuleId) iter.next();
out.println("\t\t<module organisation=\"" + mid.getOrganisation() + "\"" + " name=\""
+ mid.getName() + "\"" + " resolver=\""
+ report.getResolveEngine().getSettings().getResolverName(mid) + "\">");
for (Iterator it2 = report.getNodes(mid).iterator(); it2.hasNext();) {
IvyNode dep = (IvyNode) it2.next();
ModuleDescriptor md = null;
if (dep.getModuleRevision() != null) {
md = dep.getModuleRevision().getDescriptor();
}
StringBuffer details = new StringBuffer();
if (dep.isLoaded()) {
details.append(" status=\"").append(dep.getDescriptor().getStatus()).append(
"\"").append(" pubdate=\"").append(
Ivy.DATE_FORMAT.format(new Date(dep.getPublication()))).append("\"")
.append(" resolver=\"").append(
dep.getModuleRevision().getResolver().getName()).append("\"")
.append(" artresolver=\"").append(
dep.getModuleRevision().getArtifactResolver().getName()).append(
"\"");
}
if (dep.isEvicted(report.getConfiguration())) {
EvictionData ed = dep.getEvictedData(report.getConfiguration());
if (ed.getConflictManager() != null) {
details.append(" evicted=\"").append(ed.getConflictManager()).append("\"");
} else {
details.append(" evicted=\"transitive\"");
}
}
if (dep.hasProblem()) {
details.append(" error=\"").append(dep.getProblem().getMessage()).append("\"");
}
if (md != null && md.getHomePage() != null) {
details.append(" homepage=\"").append(md.getHomePage()).append("\"");
}
extraAttributes = md != null ? md.getExtraAttributes() : dep.getResolvedId()
.getExtraAttributes();
for (Iterator iterator = extraAttributes.keySet().iterator(); iterator.hasNext();) {
String attName = (String) iterator.next();
details.append(" extra-").append(attName).append("=\"").append(
extraAttributes.get(attName)).append("\"");
}
String defaultValue = dep.getDescriptor() != null ? " default=\""
+ dep.getDescriptor().isDefault() + "\"" : "";
int position = dependencies.indexOf(dep.getResolvedId());
out.println("\t\t\t<revision name=\""
+ dep.getResolvedId().getRevision()
+ "\""
+ (dep.getResolvedId().getBranch() == null ? "" : " branch=\""
+ dep.getResolvedId().getBranch() + "\"") + details
+ " downloaded=\"" + dep.isDownloaded() + "\"" + " searched=\""
+ dep.isSearched() + "\"" + defaultValue + " conf=\""
+ toString(dep.getConfigurations(report.getConfiguration())) + "\""
+ " position=\"" + position + "\">");
if (md != null) {
License[] licenses = md.getLicenses();
for (int i = 0; i < licenses.length; i++) {
String lurl;
if (licenses[i].getUrl() != null) {
lurl = " url=\"" + licenses[i].getUrl() + "\"";
} else {
lurl = "";
}
out.println("\t\t\t\t<license name=\"" + licenses[i].getName() + "\""
+ lurl + "/>");
}
}
if (dep.isEvicted(report.getConfiguration())) {
EvictionData ed = dep.getEvictedData(report.getConfiguration());
Collection selected = ed.getSelected();
if (selected != null) {
for (Iterator it3 = selected.iterator(); it3.hasNext();) {
IvyNode sel = (IvyNode) it3.next();
out.println("\t\t\t\t<evicted-by rev=\""
+ sel.getResolvedId().getRevision() + "\"/>");
}
}
}
Caller[] callers = dep.getCallers(report.getConfiguration());
for (int i = 0; i < callers.length; i++) {