Shantanu, thanks for the reply; yes, that definitely seems like a similar 
situation.  I will take a close look at that code tomorrow.

Here is the example that you requested:
Entry point for the plugin:
https://github.com/ckuttruff/clj-sql-up/blob/master/src/leiningen/clj_sql_up.clj

Function that is called:
https://github.com/ckuttruff/clj-sql-up/blob/master/src/clj_sql_up/migrate.clj

Example project.clj that uses the plugin:
(defproject foo "0.1.0"
  :plugins [[clj-sql-up "0.1.0"]]
  :clj-sql-up {:database "jdbc:postgresql://localhost:5432/slackz?slackz"})

Leiningen call:
lein clj-sql-up migrate

** Note: I know there are some existing tools to manage db migrations, but 
I'm developing this in large part to learn more about leiningen / writing 
plugins.

Thanks again,
-Chris


On Thursday, July 11, 2013 12:19:03 AM UTC-7, Shantanu Kumar wrote:
>
>
>
> On Thursday, 11 July 2013 12:24:34 UTC+5:30, Chris Kuttruff wrote:
>>
>> Eg: 
>>
>> I have a leiningen plugin I'm building that calls some jdbc stuff, but 
>> the specific driver would be specified in the project that brings in my 
>> plugin as a dependency.
>>
>
> Can you describe your use case with an example maybe? I am not sure if 
> it's similar to what you want, but some time back I wrote a plugin called 
> lein-servlet that can fetch a user-specified dependency (in project.clj) 
> from Clojars. Checking out the sample project.clj is pretty easy -- run the 
> following at command line:
>
> $ lein new lein-servlet foo
> $ cd foo
> $ lein servlet run  # Ctrl+C to stop
> $ # see the project.clj that uses Jetty by default
>
> The plugin is here:
>
> https://github.com/kumarshantanu/lein-servlet
>
> Shantanu
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to