librelist archives

« back to archive

Re: [leiningen] Any way to specify dependencies for a project-specific plugin?

Re: [leiningen] Any way to specify dependencies for a project-specific plugin?

From:
Phil Hagelberg
Date:
2013-04-10 @ 17:25
Korny Sietsma writes:

> I'm looking to move some of these into a project-specific plugin by setting
> up a .lein-classpath etc.

> Is there some way to do this?  Or should I give up and stick to
> aliasing?

It depends; why do you want this to be a task instead of running in the context of
your project? If it needs your project's dependencies it should probably
run in the project. You could put fs in :plugins, but it feels wrong.

-Phil

Re: [leiningen] Any way to specify dependencies for a project-specific plugin?

From:
Korny Sietsma
Date:
2013-04-11 @ 01:08
It's just using fs to do file manipulation - the particular task is doing
some dev machine bootstrapping, setting up a new dev machine with correct
configs and the like, it doesn't (currently) need any other project
dependencies.

I did manage to get it to work by putting the bootstrap function in the
project code, and using eval-in-project to call it from the plugin; it just
feels a little ugly, as it'd be nice to keep the plugin functionality local
to the plugin.  I guess it is likely to need more project logic over time,
so this model makes sense; it's just a bit confusing compared to how I'd
write a simple scripting task in something like rake or gradle.

(note that I did try adding fs to :plugins but it didn't seem to compile)

- Korny



On 11 April 2013 03:25, Phil Hagelberg <phil@hagelb.org> wrote:

>
> Korny Sietsma writes:
>
> > I'm looking to move some of these into a project-specific plugin by
> setting
> > up a .lein-classpath etc.
>
> > Is there some way to do this?  Or should I give up and stick to
> > aliasing?
>
> It depends; why do you want this to be a task instead of running in the
> context of
> your project? If it needs your project's dependencies it should probably
> run in the project. You could put fs in :plugins, but it feels wrong.
>
> -Phil
>



-- 
Kornelis Sietsma  korny at my surname dot com http://korny.info
"We do not quit playing because we grow old, we grow old because we quit
playing" - O.W. Holmes