4

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.

octopusgrabbus
  • 10,555
  • 15
  • 68
  • 131
Teo Choong Ping
  • 12,512
  • 18
  • 64
  • 91

2 Answers2

4

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

Community
  • 1
  • 1
Jared314
  • 5,181
  • 24
  • 30
  • 1
    Thanks! -- this is not so helpful for my project which has a dozen or more jar files. :-) This lein plugin should work for me https://github.com/dchelimsky/lein-expand-resource-paths – Teo Choong Ping Oct 29 '13 at 15:44
  • Please see the following answer regarding :resource-paths which does not require a maven repo – Alan Thompson Nov 20 '15 at 18:00
0

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

Alan Thompson
  • 29,276
  • 6
  • 41
  • 48