String toFile;
// http://sourceforge.net/tracker/index.php?func=detail&aid=1011493&group_id=41841&atid=431431
toFile = getString(to);
log(fromFile, verbosity);
try {
FilterSetCollection executionFilters = new FilterSetCollection();
if (filtering) {
executionFilters.addFilterSet(getProject().getGlobalFilterSet());
}
for (Enumeration filterEnum = getFilterSets().elements(); filterEnum.hasMoreElements();) {
executionFilters.addFilterSet((FilterSet) filterEnum.nextElement());
}
copyOrInjectFile(fromFile, toFile, executionFilters);
} catch (Exception e) {
LOG.error("InjectCopyTask error", e);
throw new BuildException("Error instramenting " + fromFile, e, getLocation());