How do I get Lein to work with JFreeChart and Djcartes?

I am trying to figure out how to use lein with clojure and get it to load the correct .jar files on Win7 x64. As a concrete example, I am trying to use JFreeChart and Dejcartes.

My questions are general and not related to JfreeChart. I basically don’t understand how to close the gap between seeing an example that uses a particular package and getting this package for me through the lane. Hopefully someone can answer as it applies to other packages.

Refer to this link: https://github.com/markmfredrickson/dejcartes/blob/master/Readme.txt My project.clj looks like this (commented on one or two last 2 lines for this post).

(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"]])
  • I see the (import '(org.jfree.chart chartframe))Dejcartes readme.txt used in the readme.txt file, so I think it means I need a .jar file for JFreeChart, right?

    I put [org.jfree/chart "1.0.13"].clj in my project, but lein depscomplains about it like this:

    C:\Users\me\code\Clojure\monty>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.
    

    It seems to me that I need to download the .jar file directly, but as soon as I have a .jar file, how can I persuade lein to put it in the classpath for me so that I can use it using emacs etc.? >

  • In the example, Dejcartes is used (require '[com.markmfredrickson.dejcartes :as chart]), so I put [com.markmfredrickson/dejcartes "1.0.0"]project.clj in my project. This seems to start loading some things when I run lein deps, but then it suffocates in the same way:

    C:\Users\me\code\Clojure\monty>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.        
    

    , , , (), Dejcartes . Lein Dejcartes?

  • , , - , lein ? , project.clj, , , "1.0.2" ..

+5
1

- , . Java-, , Maven Central. , Maven Central Search , . JFreeChart. this. . : groupid, artifactid verison. - (/), - , - ... , . , [jfree/jfreechart "1.0.13"].

, , Clojure, , , clojars, .

, dejcartes , , , leiningen, cake, maven - . - maven. , , .

, leiningen search . Cake clojars, , , , Leiningen.

+5

All Articles