Reputation:
Is there a way to load a lein plugin, say codex or lein-beanstalk, as a clojure library ?
I'm writing some tools for managing my lein projects, and I keep finding myself wanting to have the functionality of lein plugins as libraries in my code -- but I don't see a way to access the lein-pluins namespaces from clojure user land.
In particular, I want to use: https://github.com/weavejester/codox
I want to be able to do the equiv of "lein doc" but from inside of a "lein repl."
The problem is that I can't load the codox.codox.core namespace.
Thanks!
Upvotes: 2
Views: 520
Reputation: 127791
Of course you can do it. Leiningen plugins are plain maven artifacts. All you need to do is to specify your plugin in :dependencies
clause in project.clj
, like this:
:dependencies [[org.clojure/clojure "1.3.0"]
[lein-beanstalk "0.2.2"]]
Then run lein deps
and Leiningen will download needed plugin into your lib directory.
Upvotes: 2