Skip to content
This repository was archived by the owner on Apr 30, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
.idea/libraries
.idea/tasks.xml
.idea/workspace.xml
target
.settings
.springBeans
.classpath
.project
/.idea
/.gradle
/build
/*.iml
/*.ipr
/*.iws
bin/
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ Alternatively, the access and secret keys for the account can be provided using
* `AWS_ACCESS_KEY_ID` (or `AWS_ACCESS_KEY`) and `AWS_SECRET_KEY` (or `AWS_SECRET_ACCESS_KEY`) [environment variables][env-var]
* `aws.accessKeyId` and `aws.secretKey` [system properties][sys-prop]
* The Amazon EC2 [Instance Metadata Service][instance-metadata]
* Loads the AWS credential profiles file from the default location (`~/.aws/credentials`) or from an alternate location
if `AWS_CREDENTIAL_PROFILES_FILE` is set [AWS configuration profiles][profile-prop], [Config file details][profile-file-loc]

## Making Artifacts Public
This wagon doesn't set an explict ACL for each artfact that is uploaded. Instead you should create an AWS Bucket Policy to set permissions on objects. A bucket policy can be set in the [AWS Console][console] and can be generated using the [AWS Policy Generator][policy-generator].
Expand Down Expand Up @@ -171,4 +173,6 @@ aws s3api put-bucket-policy --bucket $BUCKET --policy "$POLICY"
[policy-generator]: http://awspolicygen.s3.amazonaws.com/policygen.html
[s3]: http://aws.amazon.com/s3/
[sys-prop]: http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/SystemPropertiesCredentialsProvider.html
[profile-prop]: http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/profile/ProfileCredentialsProvider.html
[profile-file-loc]: http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/profile/ProfilesConfigFile.html#ProfilesConfigFile--
[wagon]: http://maven.apache.org/wagon/
35 changes: 0 additions & 35 deletions aws-maven.iml

This file was deleted.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<description>Standard Maven wagon support for s3:// urls</description>

<properties>
<amazonaws.version>1.7.1</amazonaws.version>
<amazonaws.version>1.11.118</amazonaws.version>
<junit.version>4.11</junit.version>
<logback.version>1.1.1</logback.version>
<mockito.version>1.9.5</mockito.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@
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 {

AuthenticationInfoAWSCredentialsProviderChain(AuthenticationInfo authenticationInfo) {
super(new EnvironmentVariableCredentialsProvider(),
new SystemPropertiesCredentialsProvider(),
new InstanceProfileCredentialsProvider(),
new AuthenticationInfoAWSCredentialsProvider(authenticationInfo));
InstanceProfileCredentialsProvider.getInstance(),
new AuthenticationInfoAWSCredentialsProvider(authenticationInfo),
new ProfileCredentialsProvider());
}
}