//with significant modification from taskdefs.Ant in Ant core.
//unfortunately the only way we can share the code directly
//would be to extend Ant (which might not be a bad idea?)
for (int i = 0; i < referenceSets.size(); ++i) {
ReferenceSet set = (ReferenceSet) referenceSets.get(i);
set.copyReferencesInto(p);
}
p.setUserProperty(MagicNames.ANT_FILE, f.getAbsolutePath());
attachListeners(f, p);