On Mon, Nov 1, 2010 at 21:09, Sean Corfield <seancorfi...@gmail.com> wrote:

> This Q came up on the Leiningen list but I wanted to share my answer
> on the larger Clojure group to get feedback from a bigger pool...
>
> On Mon, Nov 1, 2010 at 8:40 PM, Shantanu Kumar <kumar.shant...@gmail.com>
> wrote:
> > There are some resource files (e.g. dbconfig.properties) I need to
> > include in code so that they are on the classpath. However, they need
> > to vary during dev/testing and production -- I will have different
> > versions of dbconfig.properties during dev/testing and production. I
> > want to know what is the recommended way to include/specify them so
> > that they are on the classpath based on he profile (dev, testing,
> > production, staging etc.) I am referring to.
>
>
My solution to this is ghetto in just the right ways for my needs. I have a
config.clj that sits next to my uberjar. In my main gen-class clj namespace
I (load-file './config.clj'). config.clj has all the configs pertinent to
that running config. The not so great part of this is that every time I need
to reference a configed parameter I have to @(ns-resolve "config" (symbol
"param")).

-- 
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