librelist archives

« back to archive

Exclude jars from uberjar via :provided ...not working

Exclude jars from uberjar via :provided ...not working

From:
Scott Klarenbach
Date:
2015-06-03 @ 19:36
Hi there,

I'm trying to exclude large dependencies from my uberjar that will be on
the deployment environment's classpath, but I'm not having any success.

I've added the following to my project.clj:

:profiles {:uberjar {:aot :all}
             :provided {:dependencies
                        [[edu.stanford.nlp/stanford-corenlp "3.4.1"]
                         [edu.stanford.nlp/stanford-corenlp "3.4.1"
                          :classifier "models"]]}
             :dev {:resource-paths ["test-data"]}}

but the edu.stanford files still end up packaged inside my uberjar, making
it humongous.

Am I missing something simple here?  Or is there another way of excluding
dependencies from the uberjar?

Thanks.

-- 
Talk to you soon,

Scott Klarenbach

PointyHat Software Corp.
www.pointyhat.ca
p 604-568-4280
e scott@pointyhat.ca
2404 Guelph Street
Suite A
Vancouver, BC, V5T3P3

_______________________________________
To iterate is human; to recur, divine

Re: [leiningen] Exclude jars from uberjar via :provided ...not working

From:
Jeremy Heiler
Date:
2015-06-03 @ 19:43
Are they also in your top-level :dependencies vector? If so, you need to
remove them.

On Wed, Jun 3, 2015 at 3:36 PM, Scott Klarenbach <scott@pointyhat.ca> wrote:

> Hi there,
>
> I'm trying to exclude large dependencies from my uberjar that will be on
> the deployment environment's classpath, but I'm not having any success.
>
> I've added the following to my project.clj:
>
> :profiles {:uberjar {:aot :all}
>              :provided {:dependencies
>                         [[edu.stanford.nlp/stanford-corenlp "3.4.1"]
>                          [edu.stanford.nlp/stanford-corenlp "3.4.1"
>                           :classifier "models"]]}
>              :dev {:resource-paths ["test-data"]}}
>
> but the edu.stanford files still end up packaged inside my uberjar, making
> it humongous.
>
> Am I missing something simple here?  Or is there another way of excluding
> dependencies from the uberjar?
>
> Thanks.
>
> --
> Talk to you soon,
>
> Scott Klarenbach
>
> PointyHat Software Corp.
> www.pointyhat.ca
> p 604-568-4280
> e scott@pointyhat.ca
> 2404 Guelph Street
> Suite A
> Vancouver, BC, V5T3P3
>
> _______________________________________
> To iterate is human; to recur, divine
>

Re: [leiningen] Exclude jars from uberjar via :provided ...not working

From:
Scott Klarenbach
Date:
2015-06-03 @ 19:53
Thanks Jeremy, that did the trick.  I was pulling my hair out.


On Wed, Jun 3, 2015 at 12:43 PM, Jeremy Heiler <jeremyheiler@gmail.com>
wrote:

> Are they also in your top-level :dependencies vector? If so, you need to
> remove them.
>
> On Wed, Jun 3, 2015 at 3:36 PM, Scott Klarenbach <scott@pointyhat.ca>
> wrote:
>
>> Hi there,
>>
>> I'm trying to exclude large dependencies from my uberjar that will be on
>> the deployment environment's classpath, but I'm not having any success.
>>
>> I've added the following to my project.clj:
>>
>> :profiles {:uberjar {:aot :all}
>>              :provided {:dependencies
>>                         [[edu.stanford.nlp/stanford-corenlp "3.4.1"]
>>                          [edu.stanford.nlp/stanford-corenlp "3.4.1"
>>                           :classifier "models"]]}
>>              :dev {:resource-paths ["test-data"]}}
>>
>> but the edu.stanford files still end up packaged inside my uberjar,
>> making it humongous.
>>
>> Am I missing something simple here?  Or is there another way of excluding
>> dependencies from the uberjar?
>>
>> Thanks.
>>
>> --
>> Talk to you soon,
>>
>> Scott Klarenbach
>>
>> PointyHat Software Corp.
>> www.pointyhat.ca
>> p 604-568-4280
>> e scott@pointyhat.ca
>> 2404 Guelph Street
>> Suite A
>> Vancouver, BC, V5T3P3
>>
>> _______________________________________
>> To iterate is human; to recur, divine
>>
>
>


-- 
Talk to you soon,

Scott Klarenbach

PointyHat Software Corp.
www.pointyhat.ca
p 604-568-4280
e scott@pointyhat.ca
2404 Guelph Street
Suite A
Vancouver, BC, V5T3P3

_______________________________________
To iterate is human; to recur, divine