From 2c9caf7efbd084fe6451b4142574c9d48479dbfb Mon Sep 17 00:00:00 2001 From: Brandon Beck Date: Mon, 1 Dec 2014 15:19:54 -0600 Subject: [PATCH 1/8] Remove intellij project files. --- .gitignore | 7 +++--- .idea/compiler.xml | 33 ------------------------- .idea/copyright/profiles_settings.xml | 5 ---- .idea/misc.xml | 17 ------------- .idea/modules.xml | 9 ------- aws-maven.iml | 35 --------------------------- 6 files changed, 4 insertions(+), 102 deletions(-) delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/copyright/profiles_settings.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 aws-maven.iml diff --git a/.gitignore b/.gitignore index b6f7c003..ac6c563a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -.idea/libraries -.idea/tasks.xml -.idea/workspace.xml +.idea/ +*.ipr +*.iws +*.iml target diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index e932004b..00000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml deleted file mode 100644 index aa83f9d8..00000000 --- a/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 4c4c1de6..00000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index c22bc563..00000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/aws-maven.iml b/aws-maven.iml deleted file mode 100644 index 2e0133fc..00000000 --- a/aws-maven.iml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 57f02226ec1ea03fa81e18f5a7011f558e678294 Mon Sep 17 00:00:00 2001 From: Brandon Beck Date: Mon, 1 Dec 2014 15:23:22 -0600 Subject: [PATCH 2/8] Update with MainStreetHub needs. This update contains two principle parts. First is the upgrade to the newest version of the AWS Java SDK. This enables us to use a better credentials provider chain that will read a ~/.aws/credentials file if it's present. Secondly, we update the PutObject API calls to also grant the bucket owner full access to any objects that were uploaded. This is important because, at MainStreetHub at least, our build system has credentials to a different AWS account from the one that owns the S3 bucket that we're writing artifacts into. If we don't do this then we end up in a situation where we can write artifacts just fine to the bucket, but can't read them! --- pom.xml | 6 +++++- .../AuthenticationInfoAWSCredentialsProviderChain.java | 6 ++++-- .../build/aws/maven/SimpleStorageServiceWagon.java | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index ce78b0f0..3dc1a723 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ Standard Maven wagon support for s3:// urls - 1.7.1 + 1.9.8 4.11 1.1.1 1.9.5 @@ -110,6 +110,10 @@ 2.16 random + + + **/SimpleStorageServiceWagonIntegrationTest.java + diff --git a/src/main/java/org/springframework/build/aws/maven/AuthenticationInfoAWSCredentialsProviderChain.java b/src/main/java/org/springframework/build/aws/maven/AuthenticationInfoAWSCredentialsProviderChain.java index 86726039..1ef2659d 100644 --- a/src/main/java/org/springframework/build/aws/maven/AuthenticationInfoAWSCredentialsProviderChain.java +++ b/src/main/java/org/springframework/build/aws/maven/AuthenticationInfoAWSCredentialsProviderChain.java @@ -20,6 +20,7 @@ import com.amazonaws.auth.EnvironmentVariableCredentialsProvider; import com.amazonaws.auth.InstanceProfileCredentialsProvider; import com.amazonaws.auth.SystemPropertiesCredentialsProvider; +import com.amazonaws.auth.profile.ProfileCredentialsProvider; import org.apache.maven.wagon.authentication.AuthenticationInfo; final class AuthenticationInfoAWSCredentialsProviderChain extends AWSCredentialsProviderChain { @@ -27,7 +28,8 @@ final class AuthenticationInfoAWSCredentialsProviderChain extends AWSCredentials AuthenticationInfoAWSCredentialsProviderChain(AuthenticationInfo authenticationInfo) { super(new EnvironmentVariableCredentialsProvider(), new SystemPropertiesCredentialsProvider(), - new InstanceProfileCredentialsProvider(), - new AuthenticationInfoAWSCredentialsProvider(authenticationInfo)); + new ProfileCredentialsProvider(), + new AuthenticationInfoAWSCredentialsProvider(authenticationInfo), + new InstanceProfileCredentialsProvider()); } } diff --git a/src/main/java/org/springframework/build/aws/maven/SimpleStorageServiceWagon.java b/src/main/java/org/springframework/build/aws/maven/SimpleStorageServiceWagon.java index 1e734be6..5637ccc6 100644 --- a/src/main/java/org/springframework/build/aws/maven/SimpleStorageServiceWagon.java +++ b/src/main/java/org/springframework/build/aws/maven/SimpleStorageServiceWagon.java @@ -182,7 +182,7 @@ protected void putResource(File source, String destination, TransferProgress tra in = new TransferProgressFileInputStream(source, transferProgress); - this.amazonS3.putObject(new PutObjectRequest(this.bucketName, key, in, objectMetadata)); + this.amazonS3.putObject(new PutObjectRequest(this.bucketName, key, in, objectMetadata).withCannedAcl(CannedAccessControlList.BucketOwnerFullControl)); } catch (AmazonServiceException e) { throw new TransferFailedException(String.format("Cannot write file to '%s'", destination), e); } catch (FileNotFoundException e) { From b070c694be41590876c56c5aaa392a03c4aa4033 Mon Sep 17 00:00:00 2001 From: Brandon Beck Date: Mon, 1 Dec 2014 15:46:15 -0600 Subject: [PATCH 3/8] Re-home the artifacts so we can publish them. --- pom.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 3dc1a723..7d8695f2 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,14 @@ 4.0.0 - org.springframework.build + + org.sonatype.oss + oss-parent + 7 + + + + com.mainstreethub.build aws-maven jar 5.1.0.BUILD-SNAPSHOT @@ -137,8 +144,8 @@ - scm:git:https://github.com/spring-projects/aws-maven.git - https://github.com/spring-projects/aws-maven + scm:git:git@github.com:mainstreethub/aws-maven + https://github.com/mainstrethub/aws-maven From eba12f4389d89760190ef49772f0632713383742 Mon Sep 17 00:00:00 2001 From: Brandon Beck Date: Mon, 1 Dec 2014 15:54:29 -0600 Subject: [PATCH 4/8] Update version number. --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7d8695f2..8af95c17 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,8 @@ com.mainstreethub.build aws-maven jar - 5.1.0.BUILD-SNAPSHOT + + 5.0.0.RELEASE.MSH.1-SNAPSHOT Amazon Web Services S3 Maven Wagon Support Standard Maven wagon support for s3:// urls From 470fe5f60a5599b22e68f6b83401f7b581a94e70 Mon Sep 17 00:00:00 2001 From: Brandon Beck Date: Mon, 1 Dec 2014 15:59:37 -0600 Subject: [PATCH 5/8] Don't worry about poorly formed javadocs. --- pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pom.xml b/pom.xml index 8af95c17..d36b5302 100644 --- a/pom.xml +++ b/pom.xml @@ -99,6 +99,15 @@ 1.7 + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.1 + + -Xdoclint:none + + org.apache.maven.plugins maven-deploy-plugin From 48137965bf0b5cc732c2440a71bc56d409e83931 Mon Sep 17 00:00:00 2001 From: Brandon Beck Date: Mon, 1 Dec 2014 16:06:16 -0600 Subject: [PATCH 6/8] Add developerConnection to pom. --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d36b5302..d28bcc7d 100644 --- a/pom.xml +++ b/pom.xml @@ -141,7 +141,7 @@ - https://github.com/spring-projects/aws-maven + https://github.com/mainstreethub/aws-maven 2007 @@ -155,6 +155,7 @@ scm:git:git@github.com:mainstreethub/aws-maven + scm:git:git@github.com:mainstreethub/aws-maven https://github.com/mainstrethub/aws-maven From 05cd01596cc807c1675e315eba402cee63425cda Mon Sep 17 00:00:00 2001 From: Brandon Beck Date: Mon, 1 Dec 2014 16:08:46 -0600 Subject: [PATCH 7/8] [maven-release-plugin] prepare release aws-maven-5.0.0.RELEASE.MSH.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d28bcc7d..9a56faad 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ aws-maven jar - 5.0.0.RELEASE.MSH.1-SNAPSHOT + 5.0.0.RELEASE.MSH.1 Amazon Web Services S3 Maven Wagon Support Standard Maven wagon support for s3:// urls From 6d6573157a5024a6543086e3a7d03a5c4ba090f8 Mon Sep 17 00:00:00 2001 From: Brandon Beck Date: Mon, 1 Dec 2014 16:08:48 -0600 Subject: [PATCH 8/8] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9a56faad..eb67d4f7 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ aws-maven jar - 5.0.0.RELEASE.MSH.1 + 5.0.0.RELEASE.MSH.2-SNAPSHOT Amazon Web Services S3 Maven Wagon Support Standard Maven wagon support for s3:// urls