use of org.apache.ivy.core.report.MetadataArtifactDownloadReport in project ant-ivy by apache.
the class XmlReportWriter method outputMetadataArtifact.
private void outputMetadataArtifact(PrintWriter out, IvyNode dep) {
if (dep.getModuleRevision() != null) {
MetadataArtifactDownloadReport madr = dep.getModuleRevision().getReport();
out.print("\t\t\t\t<metadata-artifact");
out.print(" status=\"" + XMLHelper.escape(madr.getDownloadStatus().toString()) + "\"");
out.print(" details=\"" + XMLHelper.escape(madr.getDownloadDetails()) + "\"");
out.print(" size=\"" + madr.getSize() + "\"");
out.print(" time=\"" + madr.getDownloadTimeMillis() + "\"");
if (madr.getLocalFile() != null) {
out.print(" location=\"" + XMLHelper.escape(madr.getLocalFile().getAbsolutePath()) + "\"");
}
out.print(" searched=\"" + madr.isSearched() + "\"");
if (madr.getOriginalLocalFile() != null) {
out.print(" original-local-location=\"" + XMLHelper.escape(madr.getOriginalLocalFile().getAbsolutePath()) + "\"");
}
ArtifactOrigin origin = madr.getArtifactOrigin();
if (origin != null) {
out.print(" origin-is-local=\"" + String.valueOf(origin.isLocal()) + "\"");
out.print(" origin-location=\"" + XMLHelper.escape(origin.getLocation()) + "\"");
}
out.println("/>");
}
}
Aggregations