Clojure: Importing a Leiningen Project into Eclipse
March 10th, 2011 | Posted by in ComputingTo import a Leiningen project into Eclipse, so that you can use CounterClockwise with all its nice features, such as syntax highlighting, there is a handy plugin called lein-eclipse .
To get started, all you have to do is to add this plugin as a dev-dependency in your project’s project.clj .
(defproject my-project "1.0.0-SNAPSHOT"
:description "My Clojure Leiningen Project"
:dependencies [
[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]
[ring/ring-jetty-adapter "0.2.5"]
]
:dev-dependencies [
[lein-eclipse "1.0.0"]
]
)
Then, you need to download the project dependencies via
prompt> lein deps
This will automatically install lein-eclipse and add a new task called eclipse to leiningen . Invoking
prompt> lein eclipse
runs this task and creates the Eclipse projects files .project and .classpath . Now you can simply import the project into Eclipse via “File->Import->Existing Project into Workspace”.
本文介绍如何将Leiningen项目导入Eclipse,并利用CounterClockwise插件增强开发体验。通过在project.clj文件中添加依赖并运行特定任务,可以实现语法高亮等特性。
3401

被折叠的 条评论
为什么被折叠?



