private TargetModuleID[] distribute(final File file, final File plan) throws Exception {
log.info("Distributing module artifact: " + file + " with plan " + plan);
DeploymentManager manager = getDeploymentManager();
Target[] targets = manager.getTargets();
ProgressObject progress = manager.distribute(targets, file, plan);
DeploymentStatus status = waitFor(progress);
if (status.isFailed()) {
//
// FIXME: There must be a better way to handle this.