use of org.apache.tools.ant.types.resources.LogOutputResource in project ant by apache.
the class Concat method execute.
/**
* Execute the concat task.
*/
@Override
public void execute() {
validate();
if (binary && dest == null) {
throw new BuildException("dest|destfile attribute is required for binary concatenation");
}
ResourceCollection c = getResources();
if (isUpToDate(c)) {
log(dest + " is up-to-date.", Project.MSG_VERBOSE);
return;
}
if (c.isEmpty() && ignoreEmpty) {
return;
}
try {
// most of these are defaulted because the concat-as-a-resource code hijacks a lot:
ResourceUtils.copyResource(new ConcatResource(c), dest == null ? new LogOutputResource(this, Project.MSG_WARN) : dest, null, null, true, false, append, null, null, getProject(), force);
} catch (IOException e) {
throw new BuildException("error concatenating content to " + dest, e);
}
}
Aggregations