安装clojure编译工具leiningen


Edit: Leiningen 1.3.1 got better Windows support and you don't need to follow these instructions anymore. Get the Windows distribution from here:http://github.com/technomancy/leiningen/downloads, unzip into a folder of choice and include in PATH.

Leiningen is a build tool for Clojure. Using Leiningen has been described here and here.

Leiningen installs and runs well on Linux and Mac. As of June 2010, Leiningen has experimental support for Windows and lacks the self-install feature. This post describes how to setup Leiningen on Windows XP. No prior Ant / Maven / Lancet experience is assumed.

1. Establish a directory where you want to install Leiningen (create if it doesn't exist). Example:

D:\lein


Also, add it to your system PATH environment variable.

2. Download the Leiningen script (right-click and choose "Save as"). Save it as "lein.bat" to the location discussed above.

3. Download the Leiningen JAR (for Leiningen 1.1.0) to the same location discussed above. The JAR filename can be figured out by looking at the comments (REM statements) in the lein.bat file.

4. Set environment variable LEIN_JAR to "D:\lein\leiningen-1.1.0-standalone.jar", or the appropriate path where the file is saved.


Leiningen is setup now. To test the install, try these:

D:\temp>lein new hello
D:\temp>cd hello
D:\temp\hello>lein deps
D:\temp\hello>lein test


Please let me know your comments and feedback.
=====================================================================
这篇文章的链接地址 是blogspot上的,打不开就翻下或者这里将就看看。

下面我说下需要注意的地方:
linux下很简单直接在https://github.com/technomancy/leiningen 的bin目录下有个lein文件,直接chmod +x ;然后运行下就可以了,之后将lein添加到PATH
win上,最简单的方式就是点这里下个编译好的leningen-XXXX版本.jar包 ;然后在点这里,在左上角选择对应版本的代码,下载zip包。
比如你要安装到D:\lein 就copy leningen-xxxx.jar包和zip包到这儿目录下,兵解压zip包当当前目录,然后copy解压后目录中的bin目录下的lein.bat到 D:\lein
最后就按上面说的,右键我的电脑在属性-》高级-》系统 在系统环境变量中添加LEIN_JAR=d:/lein/leningen-xxx.jar
然后再classpath的尾部添加:%LEIN_JAR%,最后在path中添加: d:\lein
之后就可以在任意的一个cmd窗口中敲入lein就一切正常了.

你可能感兴趣的:(windows,jar,工具,download,clojure,leiningen)