A simple solution for hosting private Maven repositories without the need for server support and management:
Amazon S3, , . , Amazon documentation, , .
, , , , .
{
"Version": "2012-10-17",
"Id": "Policy1428433847297",
"Statement": [
{
"Sid": "Stmt1428433844452",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::1234567890:user/maven-user"
},
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::pixite-maven"
},
{
"Sid": "Stmt1428433844452",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::1234567890:user/maven-user"
},
"Action": [
"s3:GetObject",
"s3:PutObject"
],
"Resource": "arn:aws:s3:::pixite-maven/*"
}
]
}
, pixite-maven, . , , Amazons.
, ( ), , , . - , , .
, gradle 2.4 . , gradle -wrapper.properties build.gradle . /gradlew.
task wrapper(type: Wrapper) {
gradleVersion = '2.4' }
, , ( allprojects {} script), Amazon S3 maven.
repositories {
maven {
url "s3://pixite-maven/releases"
credentials(AwsCredentials) {
accessKey AWS_ACCESS_KEY
secretKey AWS_SECRET_KEY
}
}
maven {
url "s3://pixite-maven/snapshots"
credentials(AwsCredentials) {
accessKey AWS_ACCESS_KEY
secretKey AWS_SECRET_KEY
}
}
mavenLocal()
jcenter()
}
, URL- s3://[bucket name]/[path]. , , Im AwsCredentials maven. AWS_ACCESS_KEY AWS_SECRET_KEY , DONT! , . , , gradle.properties . Heres, , ~/.gradle/gradle.properties:
AWS_ACCESS_KEY=my_aws_access_key
AWS_SECRET_KEY=my_super_secret_key
, Amazon S3, , maven .
:
BinTray (jcenter) Maven Central - . . , , (ala Fabric).
:
S3 AWS EC2.
S3
Android- Amazon S3 Maven
!!! !!!