No description or website provided.
Pull request Compare This branch is 48 commits behind s3-wagon-private:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Deploy and consume artifacts in private S3 repositories. Designed to be used from Leiningen, but should be usable in other contexts by deploying to repositories at "s3p://" URLs.



Add the plugin and repositories listing to project.clj:

:plugins [[s3-wagon-private "1.1.1"]]
:repositories {"releases" "s3p://mybucket/releases/"
               "snapshots" "s3p://mybucket/snapshots/"}

Versions of Leiningen prior to 1.7.0 don't support :plugins in project.clj; you will need to install by hand:

$ lein plugin install s3-wagon-private 1.1.1

You should keep your S3 credentials in ~/.lein/init.clj:

(def leiningen-auth {"s3p://mybucket/releases/"
                     {:username "ACCESS_KEY"
                      :passphrase "SECRET_KEY"}
                     {:username "ACCESS_KEY"
                      :passphrase "SECRET_KEY"}})

This will allow you to both read and write to/from S3 buckets as Maven repositories. Note that deploying an artifact that doesn't already exist will cause an org.jets3t.service.S3ServiceException stack trace to be emitted; this is a bug in one of the underlying libraries but is harmless.

If you are running Leiningen in an environment where you don't control the user such as Heroku or Jenkins, you can define leiningen-auth in project.clj after the defproject form. However, you should avoid committing AWS credentials to your project, so you should take them from the environment using System/getenv:

(defproject my-project "1.0.0"
  :plugins [[s3-wagon-private "1.1.1"]]
  :repositories {"releases" "s3p://mybucket/releases/"})

(def leiningen-auth {"s3p://mybucket/releases/"
                     {:username (System/getenv "AWS_ACCESS_KEY")
                      :passphrase (System/getenv "SECRET_KEY")}})




    <!-- to publish to a private bucket -->

                    <name>Some Name</name>
                    <name>Some Snapshot Name</name>

     <!-- to consume artifacts from a private bucket -->

            <name>Some Name</name>


            <!-- you can actually put the key and secret in here, I like to get them from the env -->


Copyright © 2011-2012 Phil Hagelberg and Scott Clasen

Based on aws-maven from the Spring project.

Distributed under the Apache Public License version 2.0.