librelist archives

« back to archive

Copy dependent JARs in Lein 2

Copy dependent JARs in Lein 2

From:
Stuart Sierra
Date:
2012-08-15 @ 17:11
Hi folks,

Is there a way to get Leiningen 2 to copy all dependent JARs into a
local directory?  Like what Leiningen 1 did on `lein deps` or what
`mvn dependency:copy` does.

I can hack something up with `lein classpath` or `lein pom` and Maven,
just wanted to ask first.

Why am I doing this, you ask? To package up a development environment
for a course I'm teaching, in case there's no internet access at the
venue.

Thanks,
-S

Re: [leiningen] Copy dependent JARs in Lein 2

From:
Phil Hagelberg
Date:
2012-08-16 @ 18:50
On Wed, Aug 15, 2012 at 10:11 AM, Stuart Sierra <mail@stuartsierra.com> wrote:
> Is there a way to get Leiningen 2 to copy all dependent JARs into a
> local directory?  Like what Leiningen 1 did on `lein deps` or what
> `mvn dependency:copy` does.
>
> Why am I doing this, you ask? To package up a development environment
> for a course I'm teaching, in case there's no internet access at the
> venue.

I think there's an existing plugin for this, but I'd recommend just
setting `:local-repo` to a path inside the project instead. That way
it should include plugins too.

-Phil

Re: [leiningen] Copy dependent JARs in Lein 2

From:
Stuart Sierra
Date:
2012-08-16 @ 20:16
That worked, thanks!

Although I had to add this to my deployment script to make sure I get
all the REPL dependencies:

    echo "" | lein repl

-S