Skip to content
macourtney edited this page Dec 1, 2012 · 15 revisions

Updated for version: 1.0.0

There are now 2 ways to download and create a new project with Conjure. The first is to use the Leiningen plugin and the second involves using the standalone jar as before. Going forward, the Leiningen plugin will be the preferred way to use Conjure.

It doesn’t matter if you start with the Leiningen plugin or the standalone jar. Both methods create nearly identical project directories, and you will be able to switch between them with little work.

The Leiningen Plugin

I’ve created a Leiningen plugin which will allow those familiar with Leiningen to easily download Conjure and start a new Conjure project. The plugin works with Leiningen 2.0. If you’re not familiar with Leiningen, see the Leiningen project

The rest of this section requires you to have Leiningen installed, and have a basic understanding of how it works.

Installing the Conjure Leiningen Plugin

After creating a new Leiningen project, simply add the Conjure core jar to your dependencies and the Leiningen Conjure plugin to your dev dependencies in your project.clj file.

Hello world project.clj example:

(defproject hello_world "1.0.0-SNAPSHOT"
  :description "FIXME: write"
  :dependencies [ [ org.conjure/conjure-full "X.X.X" ] ]
  :profiles { :dev { :dependencies [ [ org.conjure/lein-conjure "X.X.X" ] ] } })

In the above example X.X.X refers to the current version of conjure-full and lein-conjure. You can find the latest version of each library on clojars at: conjure-core and lein-conjure

In ~/.lein/profiles.clj:

{ :user { :plugins [ [org.conjure/lein-conjure "X.X.X" ] ] } }

After updating the project.clj file, run “lein deps” to download the lein-conjure plugin and all of its dependencies.

Creating a new Conjure project using the Leiningen plugin

To convert your project to a new Conjure project, run the following from your command line:

lein conjure new

Conjure will create a bunch of files and directories in your project. You now have a Conjure project ready for you to alter as you see fit.

Clone this wiki locally