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

前端 未结 2 1624
迷失自我
迷失自我 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:15

    What you are looking for is Leigningen's hard to find unless you know what to look for "checkouts" features.

    Documentation: https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#checkout-dependencies

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题