in src/java/org/apache/ivy/ant/IvyReport.java [157:223]
public void doExecute() throws BuildException {
Ivy ivy = getIvyInstance();
IvySettings settings = ivy.getSettings();
conf = getProperty(conf, settings, "ivy.resolved.configurations", resolveId);
if ("*".equals(conf)) {
conf = getProperty(settings, "ivy.resolved.configurations", resolveId);
}
if (conf == null) {
throw new BuildException("no conf provided for ivy report task: "
+ "It can either be set explicitly via the attribute 'conf' or "
+ "via 'ivy.resolved.configurations' property or a prior call to <resolve/>");
}
if (todir == null) {
String t = getProperty(settings, "ivy.report.todir");
if (t != null) {
todir = getProject().resolveFile(t);
}
}
if (todir != null && todir.exists()) {
todir.mkdirs();
}
outputpattern = getProperty(outputpattern, settings, "ivy.report.output.pattern");
if (outputpattern == null) {
outputpattern = "[organisation]-[module]-[conf].[ext]";
}
if (todir != null && todir.exists() && !todir.isDirectory()) {
throw new BuildException("destination directory should be a directory !");
}
if (resolveId == null) {
organisation = getProperty(organisation, settings, "ivy.organisation", resolveId);
module = getProperty(module, settings, "ivy.module", resolveId);
if (organisation == null) {
throw new BuildException("no organisation provided for ivy report task: "
+ "It can either be set explicitly via the attribute 'organisation' or "
+ "via 'ivy.organisation' property or a prior call to <resolve/>");
}
if (module == null) {
throw new BuildException("no module name provided for ivy report task: "
+ "It can either be set explicitly via the attribute 'module' or "
+ "via 'ivy.module' property or a prior call to <resolve/>");
}
resolveId = ResolveOptions.getDefaultResolveId(new ModuleId(organisation, module));
}
try {
String[] confs = splitToArray(conf);
if (xsl) {
genreport(confs);
}
if (xml) {
genxml(confs);
}
if (graph) {
genStyled(confs, getStylePath("ivy-report-graph.xsl"), "graphml");
}
if (dot) {
genStyled(confs, getStylePath("ivy-report-dot.xsl"), "dot");
}
} catch (IOException e) {
throw new BuildException("impossible to generate report: " + e, e);
}
}