Skip to content

How to use a plugin

macourtney edited this page Sep 13, 2010 · 3 revisions

Added in version: 0.6
Updated for version: 0.7

Plugins allow third parties to extend the capabilities of Conjure.

To include a plugin in your application, simply include the jar for the plugin in your Leiningen project.clj or download the plugin and copy its directory to the plugins directory.

For example, to install the example plugin called simple-authentication, you can simply add the simple-authentication project to your dependencies in your project.clj file:

(defproject simple_authentication_test "1.0.0-SNAPSHOT"
  :description "FIXME: write"
  :dependencies [[org.clojure/clojure "1.1.0"]
                 [org.clojure/clojure-contrib "1.1.0"]
                 [conjure-core "0.7.0-RC2"]
                 [simple-authentication "1.0.0-RC1"]]
  :dev-dependencies [[lein-conjure "0.7.0-RC2"]])

Now download the simple-authentication jar using the following Leiningen command:

lein deps

You will now find the simple authentication jar file in your lib directory.

To install the plugin, use the plugin script and pass it the install option. To install simple-authentication, use:

lein conjure plugin install simple-authentication

Simple authentication will generate a bunch of files. If you later decide you do not want to use simple-authentication, you can uninstall it using the uninstall command of the plugin script:

lein conjure plugin uninstall simple-authentication

After running uninstall, you’ll need to delete the simple-authentication jar file from your lib directory, and remove the reference to it in your project.clj file.

Note: any changes you made to the generated files will be lost when you uninstall simple-authentication and any references to the plugin or generated files must be removed or exceptions will occur.

Clone this wiki locally