On Tue, Mar 27, 2012 at 9:41 PM, Julien Chastang
<julien.c.chast...@gmail.com> wrote:
> I have Clojure project artifacts that are not in a public Maven repository,
> but simply in a local repository (so-called unmanaged dependencies). When
> pushing a project to Heroku, Heroku will attempt to install the local
> dependencies from a Maven repository that is bundled with your project. See
> https://devcenter.heroku.com/articles/local-maven-dependencies. If the
> artifacts do not contain checksum files, they are ignored by the
> installation process, or at the very least you get pesky warnings about
> this. (The whole unmanaged dependency Heroku deployment is fragile, and took
> me a while to get right.)

OK, I see. I've been working on a better approach to private
dependencies, but it's not very well documented yet.

The gist of it is to get the dependencies into a repository hosted on
a private S3 bucket. Getting them out there is pretty easy once you
have an AWS account; just follow the steps on
https://github.com/technomancy/s3-wagon-private and do "lein deploy"
once you've added the bucket to :repositories with an s3p:// URL.

Then on Heroku you'll need to switch on the build-time config flag:
https://devcenter.heroku.com/articles/labs-user-env-compile followed
by adding your AWS credentials as config vars:

    $ heroku config:add AWS_ACCESS_KEY=[...] AWS_SECRET_KEY=[...]

Then you need to pull in the latest revision of the Clojure buildpack
as it's still a relatively new feature:

    $ heroku config:add
BUILDPACK_URL=http://github.com/heroku/heroku-buildpack-clojure.git

Then check in a file under .lein/init.clj that sets leiningen-auth
using System/getenv:

(def leiningen-auth {"s3p://secret-bucket/releases"
                     {:username (System/getenv "AWS_ACCESS_KEY")
                      :passphrase (System/getenv "AWS_SECRET_KEY")}})

I hope to have this better documented soon. Let me know if you have
any issues with it.

-Phil

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to