clojure配置repl端口和repo路徑

clojure setup

1 clojure配置repl端口和repo路徑

在windows下lein的默認三方包存放路徑在%USERPROFIL%/.m2下,windows下的此路徑一般 是C:/Document and Settings/user,但是lein和emacs在處理路徑中的空格時常常出錯

1.1 解決方法1,在工程的project.clj裏添加如下配置

:local-repo "d:\\home\\clojure\\.m2"
       ;Location of locally installed jars
       ;(that can't be downloaded from public repo's)
       :repositories  {"local" {:url "file://d:\\home\\clojure\\.m2"
                                :releases {:checksum :ignore}}}
       :repl-options {:port 30000}

1.2 解決方法2,在~/.lein/profiles.clj下添加,此方法驗證未生效,但是放在%project_name%/profiles.clj下可以

{:user  {;Location of local repository 
         :local-repo "d:\\home\\clojure\\.m2"
         ;Location of locally installed jars
         ;(that can't be downloaded from public repo's)
         :repositories  {"local" {:url "file://d:\\home\\clojure\\.m2"
                                  :releases {:checksum :ignore}}}
         :repl-options {:port 30000}
         {:plugins [[lein-pprint "1.1.1"]]
                 :dependencies [[slamhound "1.3.1"]]}}}

1.3 emacs中設置nrepl默認端口

M-x customize-variable –> nrepl-port –> "30000"


Date: 2013-07-25 20:59:15 中國標準時間

Validate XHTML 1.0

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章