Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I get Lein to work with JFreeChart and Dejcartes?
    text
    copied!<p>I'm trying to understand how to use lein with clojure and get it to download the correct .jar files on Win7 x64. As a specific example, I'm trying to use JFreeChart and Dejcartes. </p> <p>My questions are generic and not specific to JfreeChart. I fundamentally don't understand how to close the gap between seeing an example that uses some particular package, and getting that package available for me via lein. Hopefully someone can answer in way that is applicable to other packages as well.</p> <p>Refer to this link: <a href="https://github.com/markmfredrickson/dejcartes/blob/master/Readme.txt" rel="nofollow">https://github.com/markmfredrickson/dejcartes/blob/master/Readme.txt</a> My project.clj is like this (commented out one or the other last 2 lines for this post).</p> <pre><code>(defproject monty "1.0.0-SNAPSHOT" :description "Monty Game Challenge" :dependencies [[org.clojure/clojure "1.2.1"] [org.clojure/clojure-contrib "1.2.0"] ;[org.jfree/chart "1.0.13"]]) [com.markmfredrickson/dejcartes "1.0.0"]]) </code></pre> <ol> <li><p>I see <code>(import '(org.jfree.chart chartframe))</code> used in the Dejcartes readme.txt, so I think this means I need the .jar file for JFreeChart, right? </p> <p>I put <code>[org.jfree/chart "1.0.13"]</code> in my project.clj but <code>lein deps</code> complains about it as follows:</p> <pre><code>C:\Users\me\code\Clojure\monty&gt;lein deps Downloading: org/jfree/chart/1.0.13/chart-1.0.13.pom from central Downloading: org/jfree/chart/1.0.13/chart-1.0.13.pom from clojure Downloading: org/jfree/chart/1.0.13/chart-1.0.13.pom from clojars Downloading: org/jfree/chart/1.0.13/chart-1.0.13.pom from central Downloading: org/jfree/chart/1.0.13/chart-1.0.13.jar from central Downloading: org/jfree/chart/1.0.13/chart-1.0.13.jar from clojure Downloading: org/jfree/chart/1.0.13/chart-1.0.13.jar from clojars Downloading: org/jfree/chart/1.0.13/chart-1.0.13.jar from central An error has occurred while processing the Maven artifact tasks. Diagnosis: Unable to resolve artifact: Missing: ---------- 1) org.jfree:chart:jar:1.0.13 Try downloading the file manually from the project website. </code></pre> <p>I think I need to download the .jar file directly but once I have the .jar file how do I coax lein to put it in the classpath for me so I can lein swank it using emacs, etc.?</p></li> <li><p>The Dejcartes example uses <code>(require '[com.markmfredrickson.dejcartes :as chart])</code> so I put <code>[com.markmfredrickson/dejcartes "1.0.0"]</code> in my project.clj. This appears to start downloading some stuff when I run <code>lein deps</code> but then it chokes in the same way:</p> <pre><code>C:\Users\me\code\Clojure\monty&gt;lein deps Downloading: com/markmfredrickson/dejcartes/1.0.0/dejcartes-1.0.0.pom from central Downloading: com/markmfredrickson/dejcartes/1.0.0/dejcartes-1.0.0.pom from clojure Downloading: com/markmfredrickson/dejcartes/1.0.0/dejcartes-1.0.0.pom from clojars Downloading: com/markmfredrickson/dejcartes/1.0.0/dejcartes-1.0.0.pom from central Downloading: com/markmfredrickson/dejcartes/1.0.0/dejcartes-1.0.0.jar from central Downloading: com/markmfredrickson/dejcartes/1.0.0/dejcartes-1.0.0.jar from clojure Downloading: com/markmfredrickson/dejcartes/1.0.0/dejcartes-1.0.0.jar from clojars Downloading: com/markmfredrickson/dejcartes/1.0.0/dejcartes-1.0.0.jar from central An error has occurred while processing the Maven artifact tasks. Diagnosis: Unable to resolve artifact: Missing: ---------- 1) com.markmfredrickson:dejcartes:jar:1.0.0 Try downloading the file manually from the project website. </code></pre> <p>One of the repositories it is allegedly downloading from (clojars) doesn't even have Dejcartes shown in the big list. How do I get Lein to download Dejcartes?</p></li> <li><p>Finally, given that I want to start using some package, how do I get lein to automatically find the latest version? I haven't seen anything about this and all the project.clj examples seem to hard-code the version, eg <code>"1.0.2"</code> etc.</p></li> </ol> <p>Thanks a lot</p> <p>Michael</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload