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

前端 未结 2 2123
猫巷女王i
猫巷女王i 2021-02-19 09:55

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:06

    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.

提交回复
热议问题