As explained here, one can deploy to Amazon S3 with maven.
How can we do the same with sbt, that is, to publish to S3 with sbt?
In the Amazon S3 console, choose the bucket where you want to upload an object, choose Upload, and then choose Add Files. In the file selection dialog box, find the file that you want to upload, choose it, choose Open, and then choose Start Upload. You can watch the progress of the upload in the Transfer pane.
The maximum size of a file that you can upload by using the Amazon S3 console is 160 GB. To upload a file larger than 160 GB, use the AWS CLI, AWS SDK, or Amazon S3 REST API.
Here is an SBT Plugin I wrote for publishing to Amazon S3: https://github.com/frugalmechanic/fm-sbt-s3-resolver
It's similar to the already mentioned sbt-s3-resolver but is Apache 2.0 Licensed (instead of AGPL) and is available on Maven Central. It's also a little easier to use and configure.
publishTo := Some("S3" at "s3://s3-us-west-2.amazonaws.com/YOUR_BUCKET/repo")
resolvers += "S3" at "s3://s3-us-west-2.amazonaws.com/YOUR_BUCKET/repo"
Just add this to your project/plugins.sbt file:
addSbtPlugin("com.frugalmechanic" % "fm-sbt-s3-resolver" % "0.19.0")
There are multiple ways to configure the AWS Credentials which are documented on the GitHub Page.
One method is to create an ~/.sbt/.s3credentials that looks like:
accessKey = XXXXXXXXXX secretKey = XXXXXXXXXX
The credentials file will be automatically picked up by the plugin and you will be able to resolve and publish.
The question is pretty old, so may be you already found some workaround, but may be this answer will be useful for somebody else.
We also had such problem in our team and we just created an sbt-plugin for that: sbt-s3-resolver. We were using it for a while and it seems to do it's work fine. It can
Take a look at the usage instructions in readme and open an issue if something is missing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With