throw new BuildException("Destination file must be supplied",
getLocation());
}
final SessionInfoStore infoStore = new SessionInfoStore();
final ExecutionDataStore dataStore = new ExecutionDataStore();
loadSourceFiles(infoStore, dataStore);
OutputStream outputStream = null;
try {
FileUtils.getFileUtils().createNewFile(destfile, true);
outputStream = new BufferedOutputStream(new FileOutputStream(
destfile));
final ExecutionDataWriter dataWriter = new ExecutionDataWriter(
outputStream);
infoStore.accept(dataWriter);
dataStore.accept(dataWriter);
} catch (final IOException e) {
throw new BuildException(format("Unable to write merged file %s",
destfile.getAbsolutePath()), e, getLocation());
} finally {
FileUtils.close(outputStream);