By nikolay
Gradle 2.4 introduced S3 support: http://ryanharter.com/blog/2015/06/18/hosting-a-private-maven-repo-on-amazon-s3/ , https://vtorosyan.github.io/gradle-s3-private-repo/
DigitalOcean Spaces says it support s3 protocol.
But, looks like it is not drop-in replacement: after re-pointing s3 mvn repo url to DO spaces URL it is not working.
I created folder “if-mvn”, created key and secret, and trying to publish artefact to s3://if-mvn.nyc3.digitaloceanspaces.com/maven2
Got error:
Execution failed for task ‘:myApp:publishFatJarPublicationToMyRepository’.
Failed to publish publication ‘fatJar’ to repository ‘My’ Could not get resource ‘s3://if-mvn.nyc3.digitaloceanspaces.com/maven2/com/my/app/0.0.1.BUILD-SNAPSHOT/maven-metadata.xml’. The AWS Access Key Id you provided does not exist in our records. (Service: Amazon S3; Status Code: 403; Error Code: InvalidAccessKeyId; Request ID: FB0B6D0F712B59E4)
Unfortunately, DigitalOcean support were unable to explain (Ticket #711785) what’s exactly wrong with Request ID: FB0B6D0F712B59E4
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I have been trying to do the same. After half a day of trying… I found this very interesting discussion -> https://github.com/gradle/gradle/issues/1464. And here the author mentions a property that you need to set “-Dorg.gradle.s3.endpoint=https://nyc3.digitaloceanspaces.com”.
publishing {
repositories {
maven {
url "s3://if-mvn"
credentials(AwsCredentials) {
accessKey "access"
secretKey "secret"
}
}
}
}
Long story short: the url you set in publishing.repositories.maven is actually the bucket.
Are you able to change the S3 API signature? Try versions 2 and 4 and see if you have any success.
As mentioned in here you have to set following property in your gradle.properties file:
systemProp.org.gradle.s3.endpoint
An example for the Frankfurt location would be
systemProp.org.gradle.s3.endpoint=https://fra1.digitaloceanspaces.com
Then yo can specify your repo as specified by the official Gradle documentation
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.