
Here's how it's done:
- Add the following line to ~/.lein/profiles: [lein-git-deps "0.0.1-SNAPSHOT"] under :user :plugins, like so:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
{:user {:plugins [[lein-difftest "1.3.7"] [lein-marginalia "0.7.1"] [lein-pprint "1.1.1"] [lein-swank "1.4.3"] [lein-git-deps "0.0.1-SNAPSHOT"]]}} - Form the command line run: lein deps
- In your projects project.clj file add the following:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
:git-dependencies [["git://github.com/tnm/murmurhash-java.git"]] :java-source-paths [".lein-git-deps/murmurhash-java/src/main/java/ie/ucd/murmur/"]
- From the command like run: lein git-deps
- Add an import statement to your clojure files:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
(ns github-java-import-demo.core (:import (ie.ucd.murmur MurmurHash)) (:gen-class)) (defn -main "I don't do a whole lot." [& args] (println (str "Hello " (MurmurHash/hash32 "World"))))
No comments:
Post a Comment