Using lein project with /lib doesn't work

爱⌒轻易说出口 提交于 2020-01-11 03:19:14

问题


When using lein 2.2, trying to put jar files in /lib does not work.

I tried and it doesn't seems to work but plenty of docs out there says this way still works.


回答1:


The lib directory functionality was removed in Leiningen v2.0, in favor of a repository (repeatability).

To add free floating jars to a project, you will need to either deploy your dependency to Clojars or a Maven repository. The Maven repository can be as simple as a directory in your project folder.

Please see the answer to this question if you need the jar in a project local folder:

How do I use checked-in jars with leiningen




回答2:


You do not need to use maven to access a local jar file in Leiningen v2.0

Just use syntax like this in your project.clj:

:resource-paths [ "local-jars/*" ] 

and then place your *.jar files in the local-jars subdirectory of your project.

Please see this blog: http://www.troyastorino.com/tidbits/lein2-local-jars



来源:https://stackoverflow.com/questions/19658207/using-lein-project-with-lib-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!