Instantly share code, notes, and snippets.

Embed
What would you like to do?
gradle-s3-publish
apply plugin: 'java'
apply plugin: 'maven-publish'
repositories { jcenter() }
dependencies { compile 'org.slf4j:slf4j-api:1.7.12' }
publishing {
repositories {
maven {
url "http://127.0.0.1:8081/artifactory/libs-release-local/"
credentials {
username "admin"
password "password"
}
}
maven {
url "s3://gradle-maven-repo/libs-release-local"
credentials(AwsCredentials) {
accessKey "${System.getenv('AWS_KEY')}"
secretKey "${System.getenv('AWS_SECRET')}"
}
}
}
publications {
mavenJava(MavenPublication) {
groupId 'com.me'
artifactId 'sample-project'
version '1.1'
from components.java
}
}
}
@jaydeepw

This comment has been minimized.

Copy link

jaydeepw commented Dec 9, 2016

But how do I pusblish? What command?

@arulrajnet

This comment has been minimized.

Copy link

arulrajnet commented Dec 29, 2016

gradle publish This is the command to publish to s3. You can find all tasks by gradle tasks

@benjosantony

This comment has been minimized.

Copy link

benjosantony commented Jan 18, 2017

Any idea on how to set the acl for the published files ?

@UdayVishwakarma

This comment has been minimized.

Copy link

UdayVishwakarma commented Mar 5, 2018

is there a way to pass on aws_session_token along with accessKey secretKey ?

@alwyn

This comment has been minimized.

Copy link

alwyn commented May 2, 2018

Adrian is there a way to get the access and secret keys from the Maven settings.xml file instead?

@yapale

This comment has been minimized.

Copy link

yapale commented Jun 26, 2018

per @benjosantony
Any idea on how to set the acl for the published files ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment