throw new BuildException(
"Destination file is required when dumping execution data",
getLocation());
}
final ExecDumpClient client = new ExecDumpClient() {
@Override
protected void onConnecting(final InetAddress address,
final int port) {
log(format("Connecting to %s:%s", address,
Integer.valueOf(port)));
}
@Override
protected void onConnectionFailure(final IOException exception) {
log(exception.getMessage());
}
};
client.setDump(dump);
client.setReset(reset);
client.setRetryCount(retryCount);
try {
final ExecFileLoader loader = client.dump(address, port);
if (dump) {
log(format("Dumping execution data to %s",
destfile.getAbsolutePath()));
loader.save(destfile, append);
}