How to use a local repository for a Clojure library during initial development?

前端 未结 2 1615
迷失自我
迷失自我 2021-02-19 09:22

I have a question about developing a Clojure library which is not answered in the suggested workflow for Library Development and Distribution as described here: http://clojure-d

2条回答
  •  失恋的感觉
    2021-02-19 10:21

    lein install does the job:

    $ lein install -h
    Install jar and pom to the local repository; typically ~/.m2.
    

    In your library project execute lein install and your library jar and pom files will be installed under the ~/.m2 directory.

    After that when you build another project that depends on your library, lein will find its binaries in ~/.m2.

    ~/.m2 is a default location of the local Maven repository which is one of the locations used by lein during dependency resolution. It also works as a cache for remote repositories where artifacts downloaded from Maven Central or Clojars are stored.

提交回复
热议问题