while (!uploads.isEmpty()) {
Upload upload = uploads.poll();
currentUpload = upload.getDescription().substring("Uploading to ".length());
if (TransferState.InProgress.equals(upload.getState()))
getLog().debug("Waiting for upload " + currentUpload + " to finish");
upload.waitForUploadResult();
}
} catch (AmazonServiceException e) {
throw new MojoExecutionException("Error while uploading " + currentUpload);
} catch (AmazonClientException e) {
throw new MojoExecutionException("Error while uploading " + currentUpload);