if (!artifactFile.exists())
throw new MojoFailureException(
"Artifact File does not exists! (file=" + path);
BeanstalkerS3Client client = new BeanstalkerS3Client(getAWSCredentials(),
getClientConfiguration());
client.setMultipartUpload(multipartUpload);
if (StringUtils.isNotBlank(s3Region))
client.setEndpoint(String.format("s3-%s.amazonaws.com", s3Region));
getLog().info("Target Path: s3://" + s3Bucket + "/" + s3Key);
getLog().info("Uploading artifact file: " + path);
PutObjectResult result = client.putObject(new PutObjectRequest(s3Bucket, s3Key, artifactFile));
getLog().info("Artifact Uploaded");
return result;
}