jonEbird
jonEbird

Reputation: 418

How do you install an external Java library such as caldav4j in my leiningen managed app?

Goes without saying that I'm new to clojure. As a learning project, I'd like to use the caldav4j library to pull down work calendar events however I don't know how to properly pull in an external library that is not found via "lein search".

Update: Sharing my working project.clj file for reference:

(defproject caldav-sync "0.1.0-SNAPSHOT"
  :description "Extract and synchronize calendar entries locally"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.osaf/caldav4j "0.7"]]
  :repositories [["caldav4j" "https://caldav4j.googlecode.com/svn/maven/"]])

Upvotes: 1

Views: 767

Answers (1)

schaueho
schaueho

Reputation: 3504

Take a look at the dependency section of the leiningen tutorial. You would add the groupid/artifactid (probably org.osaf/caldav4j) as a dependency in the :dependencies vector. Apparently, caldav4j isn't available on Maven central according to its FAQ, so you'll need to add the Maven repository mentioned in the FAQ via the :repositories key.

Upvotes: 3

Related Questions