public void execute() throws BuildException {
try {
EventProducerCollector collector = new EventProducerCollector();
long lastModified = processFileSets(collector);
for (Iterator iter = collector.getModels().iterator(); iter.hasNext();) {
EventModel model = (EventModel) iter.next();
File parentDir = getParentDir(model);
if (!parentDir.exists() && !parentDir.mkdirs()) {
throw new BuildException(
"Could not create target directory for event model file: " + parentDir);
}
File modelFile = new File(parentDir, "event-model.xml");
if (!modelFile.exists() || lastModified > modelFile.lastModified()) {
model.saveToXML(modelFile);
log("Event model written to " + modelFile);
}
if (getTranslationFile() != null) {
// TODO Remove translation file creation facility?
if (!getTranslationFile().exists()