Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You could use pomegranate if you just want to run it in the REPL (which seems like it would be the only appropriate use case, right?). You can have it look up the latest versions using the Maven Central API. I think this is better than maintaining some sort of dependencies project, generated or otherwise.</p> <pre><code>(require '[cemerick.pomegranate :refer [add-dependencies]]) (add-dependencies :coordinates '[[clj-http "0.5.8"]] :repositories {"clojars" "http://clojars.org/repo"}) (require '[clj-http.client :as client]) ;; contrib project names from https://github.com/clojure (def contrib ["tools.nrepl" "tools.trace" "tools.namespace" "tools.macro" "test.generative" "math.numeric-tower" "core.match" "core.logic" "data.priority-map" "core.contracts" "tools.cli" "java.jmx" "java.jdbc" "java.classpath" "data.xml" "data.json" "core.unify" "core.incubator" "core.cache" "algo.monads" "data.generators" "core.memoize" "math.combinatorics" "java.data" "tools.logging" "data.zip" "data.csv" "algo.generic" "data.codec" "data.finger-tree"]) (defn add-contrib-dependencies "look up the latest version of every contrib project in maven central, and add them as dependencies using pomegranate." [project-names] (add-dependencies :coordinates (map (juxt (comp symbol (partial format "org.clojure/%s")) (fn [proj] (Thread/sleep 100) (-&gt; "http://search.maven.org/solrsearch/select?q=%s&amp;rows=1&amp;wt=json" (format proj) (client/get {:as :json}) :body :response :docs first :latestVersion))) project-names))) </code></pre> <p>Now you can just invoke this function on the list of project names:</p> <pre><code>user=&gt; (add-contrib-dependencies contrib) {[org.clojure/data.zip "0.1.1"] nil, [org.clojure/java.classpath "0.2.0"] nil, [org.clojure/core.cache "0.6.2"] nil, ...} </code></pre> <p>UPDATE: as suggested earlier, I had made this answer into a library. It can be used either as nREPL middleware or invoked manually from a running REPL session. The code can be found at <a href="https://github.com/rplevy/contrib-repl" rel="nofollow">https://github.com/rplevy/contrib-repl</a>, where usage instructions can also be found.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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