how to load latest Clojure lib from git repository

痴心易碎 提交于 2019-12-10 15:24:20

问题


I'd like to use the latest development version of clojure.data.xml. I'm using Leiningen to manage dependencies. However, there is no SNAPSHOT version in the repository on Central. How can I easily load the latest version from GitHub?


回答1:


The Maven Central repository does not hold snapshots. To use snapshots of the Clojure projects, you need to add the snapshot repository to your project. Full details here: http://dev.clojure.org/display/community/Maven+Settings+and+Repositories

The key line to add to a Leiningen project is:

:repositories {"sonatype-oss-public" "https://oss.sonatype.org/content/groups/public/"}

The latest snapshot dependency version for data.xml is:

[org.clojure/data.xml "0.2.0-SNAPSHOT"]

All Clojure contrib projects are built and released as a snapshot on every commit (gathered in 1 hr polls) AND once a week regardless of commits. So, pulling a snapshot will generally be the same or nearly the same as what's on github.




回答2:


One way to get the latest version from GitHub would be to press the green button at https://github.com/clojure/data.xml and then the 'copy to clipboard' button that will appear next. Then get a terminal on your machine and go git clone <pasted here>. You will now have that repository locally.

From there if you wanted to use that development version from another lein project you could type lein install from the command line. If that still didn't give you a great workflow please read http://jakemccrary.com/blog/2012/03/28/working-on-multiple-clojure-projects-at-once/.



来源:https://stackoverflow.com/questions/42701923/how-to-load-latest-clojure-lib-from-git-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!