Leiningen 安装<转>
来源:互联网 发布:天下三女人物捏脸数据 编辑:程序博客网 时间:2024/05/21 12:43
Leiningen是一个Clojure项目管理工具。
安装过程如下:
1. 下载lein脚本
https://raw.github.com/technomancy/leiningen/preview/bin/lein
2. 复制到/usr/bin目录下,并允许执行
- mv lein /usr/bin/
- root@chenshu-yangzhou-home:~/Downloads# chmod +x /usr/bin/lein
3. 运行lein命令,不要使用root权限
- lein
- Downloading Leiningen now...
- --2012-12-25 17:20:49-- https://github.com/downloads/technomancy/leiningen/leiningen-2.0.0-preview10-standalone.jar
- Resolving github.com (github.com)... 207.97.227.239
- Connecting to github.com (github.com)|207.97.227.239|:443... connected.
- HTTP request sent, awaiting response... 302 Found
- Location: http://cloud.github.com/downloads/technomancy/leiningen/leiningen-2.0.0-preview10-standalone.jar [following]
- --2012-12-25 17:20:50-- http://cloud.github.com/downloads/technomancy/leiningen/leiningen-2.0.0-preview10-standalone.jar
- Resolving cloud.github.com (cloud.github.com)... 216.137.55.10, 216.137.55.192, 216.137.55.57, ...
- Connecting to cloud.github.com (cloud.github.com)|216.137.55.10|:80... connected.
- HTTP request sent, awaiting response... 200 OK
- Length: 11129174 (11M) [application/x-java-archive]
- Saving to: `/home/chenshu/.lein/self-installs/leiningen-2.0.0-preview10-standalone.jar.pending'
- 100%[======================================>] 11,129,174 459K/s in 23s
- 2012-12-25 17:21:14 (470 KB/s) - `/home/chenshu/.lein/self-installs/leiningen-2.0.0-preview10-standalone.jar.pending' saved [11129174/11129174]
- Leiningen is a tool for working with Clojure projects.
- Several tasks are available:
- check Check syntax and warn on reflection.
- classpath Write the classpath of the current project to output-file.
- clean Remove all files from project's target-path.
- compile Compile Clojure source into .class files.
- deploy Build jar and deploy to remote repository.
- deps Show details about dependencies.
- do Higher-order task to perform other tasks in succession.
- help Display a list of tasks or help for a given task.
- install Install current project to the local repository.
- jar Package up all the project's files into a jar file.
- javac Compile Java source files.
- new Generate project scaffolding based on a template.
- plugin DEPRECATED. Please use the :user profile instead.
- pom Write a pom.xml file to disk for Maven interoperability.
- repl Start a repl session either with the current project or standalone.
- retest Run only the test namespaces which failed last time around.
- run Run the project's -main function.
- search Search remote maven repositories for matching jars.
- show-profiles List all available profiles or display one if given an argument.
- test Run the project's tests.
- trampoline Run a task without nesting the project's JVM inside Leiningen's.
- uberjar Package up the project files and all dependencies into a jar file.
- upgrade Upgrade Leiningen to specified version or latest stable.
- version Print version for Leiningen and the current JVM.
- with-profile Apply the given task with the profile(s) specified.
- Run lein help $TASK for details.
- See also: readme, faq, tutorial, news, sample, profiles,
- deploying and copying.
注意国内可能需要使用proxy才能下载,参考我的关于终端如何设置http代理的方式。
http://blog.csdn.net/sheismylife/article/details/8331287
如果因为网络原因安装失败,删除掉~/.lein目录后重新执行lein命令即可。
现在可以启动一个REPL会话,上一片里面用的是java -cp 命令,这里更简单:
- $ lein repl
- nREPL server started on port 55538
- REPL-y 0.1.0-beta10
- Clojure 1.4.0
- Exit: Control+D or (exit) or (quit)
- Commands: (user/help)
- Docs: (doc function-name-here)
- (find-doc "part-of-name-here")
- Source: (source function-name-here)
- (user/sourcery function-name-here)
- Javadoc: (javadoc java-object-or-class-here)
- Examples from clojuredocs.org: [clojuredocs or cdoc]
- (user/clojuredocs name-here)
- (user/clojuredocs "ns-here" "name-here")
- user=>
- user=> (+ 1 2)
- 3
0 0
- Leiningen 安装<转>
- Leiningen 安装
- Storm安装Leiningen 指南
- 安装clojure编译工具leiningen
- 安装clojure编译工具leiningen
- Leiningen安装使用及与eclipse的集成
- Leiningen使用
- Leiningen 与 maven
- clojure之leiningen生成eclipse工程
- leiningen 没网络玩不了了
- leiningen构建工具的project.clj配置
- 在Eclipse中整合Leiningen -- integrate Leiningen into Eclipse using 'External Tools'
- 用Leiningen创建第一个Clojure工程一
- 用Leiningen创建第一个Clojure工程二
- 用Leiningen创建第一个Clojure工程三
- 用Leiningen创建第一个Clojure工程四
- Leiningen uberjar时不打包指定的jar
- linux ns2安装--libotcl安装错误(转)
- 使用php curl出现的一点问题
- SMB2.0 读写文件优化
- 打响马年第一炮: 颠覆世界的新生代股软引擎!
- MD5加密实现版本控制效果如何?
- Eclipse导入Github的工程
- Leiningen 安装<转>
- 在JS中调用JSP中的变量
- 为知共享——让工作更轻松
- iOS中的CoreImage
- 关于Go,十件你可能不知道的事
- 10分钟内把永远跑不完的存储过程变为2秒跑完
- java性能的一些常用的命令与注意点
- JS中undefined,null,"",0和false的区别
- java.io.IOException: Server returned HTTP response code: 400 for URL解决方法