On Jan 2, 12:35 am, Phil Hagelberg <[email protected]> wrote:

> I'm a little reluctant to make calculating the classpath any more
> complicated than it currently is since that logic needs to be duplicated
> in a few places, but I agree that the current situation is not great.
>
> Another idea would be to write a hidden blacklist file when fetching the
> dev dependencies. The uberjar could then check that to know which jars
> to skip.
>
> I'm not sure which approach I prefer... thoughts?

I thought about the latter, too. I don't currently understand the
maven stuff enough to know how dependencies get resolved into actual
jarfile names enough to do this (there's the DependenciesTask &c.
business in leiningen/deps.clj), but I'd be happy to investigate, esp.
if someone were willing to point me in the right direction.

> > I was working on uberjar because I want to write a similar task as a
> > plugin, which is an uberjar without clojure & clojure-contrib
> > included, so that I can drop a project & its dependencies in my local
> > Clojure development environment, e.g. my Clojure saxon wrapper library
> > as well as the Java Saxon jars it depends on. Anyone else have this
> > use case?
>
> I'm not sure I understand. Why don't you just open your saxon wrapper
> project in your IDE directly rather than adding an uberjar generated
> from it? Plus if you put clojure and contrib on the classpath before
> youruberjar, then the versions in your uberjar will be shadowed.

I wasn't clear. By "development environment," I meant my `clj` script,
not any particular project per se. In my clj script, I specify a place
on the filesystem to drop jars that I want on the classpath when its
invoked; I know others have setups like this. I always put clojure &
clojure-contrib on the classpath, so I simply want the Clojure library
& any of its dependencies zipped up in a sort of uberjar-minus-clojure
(to avoid shadowing, as you mention).

I suppose I could create a leiningen project for my clj script,
specifying libraries I want as dependencies & then just putting its
uberjar on the classpath, but this requires that the libraries are
available in maven repos. Have other leiningen users solved this?

Thanks,
Perry
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to