/** * Aggregate all testsuites into a single document and write it to the * specified directory and file. * @throws BuildException thrown if there is a serious error while writing * the document. */ @Override public void execute() throws BuildException { Element rootElement = createDocument(); File destFile = getDestinationFile(); // write the document try { writeDOMTree(rootElement.getOwnerDocument(), destFile); } catch (IOException e) { throw new BuildException("Unable to write test aggregate to '" + destFile + "'", e); } // apply transformation for (AggregateTransformer transformer : transformers) { transformer.setXmlDocument(rootElement.getOwnerDocument()); transformer.transform(); } }