Leiningen的本地依赖,而不创建Maven仓库? [英] Local dependencies in Leiningen without creating a Maven repo?

查看:239
本文介绍了Leiningen的本地依赖,而不创建Maven仓库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个Compojure web应用程序,我想它使用来自我写的另一个Clojure项目的函数。我不太熟悉Maven,从我听说过,它有一个非常陡峭的学习曲线。很抱歉,一切 建议使用一个私有Maven仓库作为依赖,并不建议一个替代。我真的想避免努力与Maven如果可能的话。有人知道一个替代品吗?我目前正在使用最新版本的Leiningen。

I'm building a Compojure web application, and I'd like it to use functions from another Clojure project I wrote. I'm not at all familiar with Maven, and from what I've heard, it has a very steep learning curve. Unfortunately, everything I've seen suggests using a private Maven repo as a dependency and doesn't suggest an alternative. I'd really like to avoid struggling with Maven if possible. Does anyone know of an alternative? I'm currently using the latest version of Leiningen.

推荐答案

如果其他项目也是一个lein项目,做一个lein安装,这将照顾创建所有的本地maven仓库的东西。然后,你可以只依赖于该项目,就像对任何其他lib一样。例如:

If the other project is also a lein project, you just need to do a "lein install" and that will take care of creating all the local maven repo stuff. Then you can just depend on that project as you would do with any other lib. For example:

 (defproject mylib "1.0"
      ....)

  lein install

  (defproject myotherproject "a.b.c"
     :dependencies [[mylib "1.0"]]
     .....)

如果您与其他人共享myotherproject,并且您希望消除每次更改lein install mylib项目,请查看 lein checkouts 功能,然后使用您选择的VCS的 svn外部的等效内容。

If you are sharing "myotherproject" with other people and you want to remove some of the inconvenience of doing a "lein install" every time you change the mylib project, have a look at the lein checkouts feature and then use the equivalent of svn externals of your VCS of choice.

这篇关于Leiningen的本地依赖,而不创建Maven仓库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆