使用Leiningen与本地M2存储库 [英] Use Leiningen With Local M2 Repository
问题描述
我想编译一个本地jar到我的clojure项目,我可以很容易与以下
这样做https://gist.github.com/stuartsierra/3062743
mkdir repo
:
mvn install:install-file -DgroupId = local -DartifactId = bar \
-Dversion = 1.0.0 -Dpackaging = jar -Dfile = bar.jar \
-DlocalRepositoryPath =但我有一个持续集成和构建服务器(jenkins),在〜/ .m2中查找。我怎么能leiningen看看.m2 ???解决方案基于文档,看起来你在
项目中的
。由于您希望在不同的服务器上具有不同的本地存储库位置,因此我会将其放在个人资料< a>,而不是直接在:local-repo
cljproject.clj
中。
可能最好的办法是创建一个<在您要更改本地存储库位置的任何计算机上的
〜/ .lein / profiles.clj
中的code>:user{:user {:local-reporepo}}
I want to compile a local jar into my clojure project, I can do this easily with the following
https://gist.github.com/stuartsierra/3062743
mkdir repo mvn install:install-file -DgroupId=local -DartifactId=bar \ -Dversion=1.0.0 -Dpackaging=jar -Dfile=bar.jar \ -DlocalRepositoryPath=repo
But I have a continuous integration and build server (jenkins) that looks in ~/.m2. How can I get leiningen to look in .m2???
解决方案Based on the documentation, it looks like the key you're after is
:local-repo
inproject.clj
. Since you want to have different local repository locations on different servers, I would put this in a profile as opposed to directly in theproject.clj
.Probably the best approach would be to create a
:user
profile in~/.lein/profiles.clj
on whichever machine you want to change the location of the local repository:{:user {:local-repo "repo"}}
这篇关于使用Leiningen与本地M2存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!