Fork me on GitHub
#leiningen
<
2018-11-12
>
lispyclouds12:11:46

Hello, Is there a way to deploy an uberjar instead of a jar to clojars using lein deploy?

Alex Miller (Clojure team)21:11:26

don’t deploy uberjars to Maven repos

tcrawley21:11:27

@rahul080327 I would ask why you would want to deploy an uberjar? Uberjars that include one version of clojure produce strange errors when consumed by a project that uses another version of clojure.

timgilbert21:11:29

...actually, reading further it looks like you could probably deploy an uberjar by lein deploy clojars my.foo/bar 1.2.3 target/my-uber.jar

timgilbert21:11:51

But yes, this is not what clojars is for

Alex Miller (Clojure team)21:11:55

uberjars embed deps, making them hidden and hard to change

Alex Miller (Clojure team)21:11:07

and if you deploy them, you are a Bad Person :)

mikerod21:11:37

I’ve found uberjar deploying to be useful from an internal company standpoint. If you want to deploy release artifacts that are released as uberjar apps

Alex Miller (Clojure team)21:11:41

jk, but I have wasted many hours of my life debugging stuff like this from maven repos

Alex Miller (Clojure team)21:11:58

so, internal deploys might be ok

Alex Miller (Clojure team)22:11:12

I’m talking about clojars / maven central

mikerod22:11:19

I meant “to be” auto correct said “ton” hah

mikerod22:11:37

Yeah, I think I’d agree on clojars/central and that sort of thing

Alex Miller (Clojure team)22:11:11

if it’s internal, you can at least track who did it and steal their office chair

😆 4
mikerod22:11:33

Also, we deploy them with a “classifier” of “standalone”

mikerod22:11:15

With that said. In terms of the root question (pending they didn’t wish to do it for malicious clojars/central deploy purposes) I can’t remember if you can coerce the plain lein deploy to do this. There are a few plugins out there to do similar, but we ended up with our own because we wanted a multi-classifier-artifact deploy task for various reasons.

mikerod22:11:12

The underlying deploy task impl can definitely take multiple artifacts and if they are named with appropriate classifier notation, they’ll be deployed with classifiers correctly.